!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="33f5f812-50e2-4a0b-b3ff-8fc6df5a082a",e._sentryDebugIdIdentifier="sentry-dbid-33f5f812-50e2-4a0b-b3ff-8fc6df5a082a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206],{48444:function(e,t){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function s(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function i(e,...t){if(!n(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function l(e,t){i(e);let r=t.outputLen;if(e.length>s&r)}:{h:0|Number(e>>s&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);t.toBig=o;let a=(e,t,r)=>e>>>r;t.shrSH=a;let l=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=l;let h=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=h;let u=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=u;let c=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=c;let d=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=d;let p=(e,t)=>t;t.rotr32H=p;let f=(e,t)=>e;t.rotr32L=f;let m=(e,t,r)=>e<>>32-r;t.rotlSH=m;let g=(e,t,r)=>t<>>32-r;t.rotlSL=g;let y=(e,t,r)=>t<>>64-r;t.rotlBH=y;let b=(e,t,r)=>e<>>64-r;function x(e,t,r,s){let n=(t>>>0)+(s>>>0);return{h:e+r+(n/4294967296|0)|0,l:0|n}}t.rotlBL=b;let v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=v;let T=(e,t,r,s)=>t+r+s+(e/4294967296|0)|0;t.add3H=T;let E=(e,t,r,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0);t.add4L=E;let A=(e,t,r,s,n)=>t+r+s+n+(e/4294967296|0)|0;t.add4H=A;let w=(e,t,r,s,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(s>>>0)+(n>>>0);t.add5L=w;let S=(e,t,r,s,n,i)=>t+r+s+n+i+(e/4294967296|0)|0;t.add5H=S,t.default={fromBig:n,split:i,toBig:o,shrSH:a,shrSL:l,rotrSH:h,rotrSL:u,rotrBH:c,rotrBL:d,rotr32H:p,rotr32L:f,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:x,add3L:v,add3H:T,add4L:E,add4H:A,add5H:S,add5L:w}},83917:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},32517:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=x;let s=r(48444),n=r(34755),i=r(28772),o=[],a=[],l=[],h=BigInt(0),u=BigInt(1),c=BigInt(2),d=BigInt(7),p=BigInt(256),f=BigInt(113);for(let e=0,t=u,r=1,s=0;e<24;e++){[r,s]=[s,(2*r+3*s)%5],o.push(2*(5*s+r)),a.push((e+1)*(e+2)/2%64);let n=h;for(let e=0;e<7;e++)(t=(t<>d)*f)%p)&c&&(n^=u<<(u<r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function x(e,t=24){let r=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let s=(t+8)%10,n=(t+2)%10,i=r[n],o=r[n+1],a=y(i,o,1)^r[s],l=b(i,o,1)^r[s+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=l}let t=e[2],n=e[3];for(let r=0;r<24;r++){let s=a[r],i=y(t,n,s),l=b(t,n,s),h=o[r];t=e[h],n=e[h+1],e[h]=i,e[h+1]=l}for(let t=0;t<50;t+=10){for(let s=0;s<10;s++)r[s]=e[t+s];for(let s=0;s<10;s++)e[t+s]^=~r[(s+2)%10]&r[(s+4)%10]}e[0]^=m[s],e[1]^=g[s]}r.fill(0)}class v extends i.Hash{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,s.number)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){i.isLE||(0,i.byteSwap32)(this.state32),x(this.state32,this.rounds),i.isLE||(0,i.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,s.exists)(this);let{blockLen:t,state:r}=this,n=(e=(0,i.toBytes)(e)).length;for(let s=0;s=r&&this.keccak();let i=Math.min(r-this.posOut,n-s);e.set(t.subarray(this.posOut,this.posOut+i),s),this.posOut+=i,s+=i}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,s.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,s.output)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:s,rounds:n,enableXOF:i}=this;return e||(e=new v(t,r,s,i,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=r,e.outputLen=s,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=v;let T=(e,t,r)=>(0,i.wrapConstructor)(()=>new v(t,e,r));t.sha3_224=T(6,144,28),t.sha3_256=T(6,136,32),t.sha3_384=T(6,104,48),t.sha3_512=T(6,72,64),t.keccak_224=T(1,144,28),t.keccak_256=T(1,136,32),t.keccak_384=T(1,104,48),t.keccak_512=T(1,72,64);let E=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)((s={})=>new v(t,e,void 0===s.dkLen?r:s.dkLen,!0));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},28772:function(e,t,r){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=void 0,t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.byteSwap32=function(e){for(let r=0;re().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(s.crypto&&"function"==typeof s.crypto.getRandomValues)return s.crypto.getRandomValues(new Uint8Array(e));if(s.crypto&&"function"==typeof s.crypto.randomBytes)return s.crypto.randomBytes(e);throw Error("crypto.getRandomValues must be defined")};let s=r(83917),n=r(48444);t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.rotl=(e,t)=>e<>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e);let i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),o={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=o._0&&e<=o._9?e-o._0:e>=o._A&&e<=o._F?e-(o._A-10):e>=o._a&&e<=o._f?e-(o._a-10):void 0}let l=async()=>{};async function h(e,r,s){let n=Date.now();for(let i=0;i=0&&e{if(42!=e.length)return!1;let t=`${e}`.toLowerCase().replace("0x",""),r=(0,n.bytesToHex)((0,s.keccak_256)(t)),i="0x";for(let e=0;e=8?i+=t[e].toUpperCase():i+=t[e];return e===i},t.parseIntegerNumber=e=>{let t=parseInt(e);if(isNaN(t)||t===1/0)throw Error("Invalid number.");return t}},45068:function(e,t,r){e.exports=function(e){let t;let{Buffer:s}=r(82957),n="api.js: ",i=this,o=r(33817),a=r(95926),l=r(70571),h=new(r(39552)),{attributes:u,showAttributes:c,showAttributeErrors:d,showRuleDependencies:p}=r(76406),f=r(97759),m=function(e,t,r){let s;let n=``,i="",a=``,l="",h="";for(;Array.isArray(e)&&0!==e.length;){if("number"!=typeof t)throw Error("abnfToHtml: beg must be type number");if(t>=e.length)break;s="number"!=typeof r||t+r>=e.length?e.length:t+r;let u=0;for(let r=t;r=32&&t<=126)switch(1===u?(h+=i,u=0):2===u&&(h+=l,u=0),t){case 32:h+=" ";break;case 60:h+="<";break;case 62:h+=">";break;case 38:h+="&";break;case 34:h+=""";break;case 39:h+="'";break;case 92:h+="\";break;default:h+=String.fromCharCode(t)}else 9===t||10===t||13===t?(0===u?(h+=n,u=1):2===u&&(h+=l+n,u=1),9===t&&(h+="TAB"),10===t&&(h+="LF"),13===t&&(h+="CR")):(0===u?(h+=a,u=2):1===u&&(h+=i+a,u=2),h+=`\\x${o.utils.charToHex(t)}`)}2===u&&(h+=l),1===u&&(h+=i);break}return h},g=function(e,t,r){let s="";for(let n=t;n=32&&t<=126)s+=String.fromCharCode(t);else switch(t){case 9:s+="\\t";break;case 10:s+="\\n";break;case 13:s+="\\r";break;default:s+="\\unknown"}}return s},y=function(e){let t="Annotated Input Grammar";return e.forEach(e=>{t+=` line no: ${e.lineNo} : char index: ${e.beginChar} : length: ${e.length} : abnf: ${g(i.chars,e.beginChar,e.length)}`}),t+="\n"},b=function(e){let t="";return t+=` `,e.forEach(e=>{t+=` `}),t+="
Annotated Input Grammar
line
no.
first
char

length

text
${e.lineNo}${e.beginChar}${e.length}${m(i.chars,e.beginChar,e.length)}
\n"},x=function(e,t,r,s){let[n]=o,i="",a=`»`;return i+=`

`,s&&"string"==typeof s&&(i+=` `),i+="\n",e.forEach(e=>{let s,n,l,h,u;let c="",d="";0===t.length?(u=a,n=0):(l=(s=t[e.line]).beginChar,e.char>l&&(c=m(r,l,e.char-l)),(l=e.char)<(h=s.beginChar+s.length)&&(d=m(r,l,h-l)),u=c+a+d,n=e.char-s.beginChar,i+=` `)}),i+="
${s}
line
no.
line
offset
error
offset

text
${e.line}${s.beginChar}${n}${u}
↑: ${o.utils.stringToAsciiHtml(e.msg)}

\n"},v=function(e,t,r){let s,n,i,o;return s="",e.forEach(e=>{n=t[e.line],s+=`${n.lineNo}: ${n.beginChar}: ${e.char-n.beginChar}: `,i=n.beginChar,o=e.char-n.beginChar,s+=g(r,i,o)+" >> ",i=e.char,o=n.beginChar+n.length-e.char,s+=g(r,i,o)+"\n"+`${n.lineNo}: `+`${n.beginChar}: `+`${e.char-n.beginChar}: `+"error: "+e.msg+"\n"}),s},T=!1,E=!1,A=!1,w=!1,S=0;if(this.errors=[],s.isBuffer(e))this.chars=a.decode("BINARY",e);else if(Array.isArray(e))this.chars=e.slice();else if("string"==typeof e)this.chars=a.decode("STRING",e);else throw Error(`${n}input source is not a string, byte Buffer or character array`);this.sabnf=a.encode("STRING",this.chars),this.scan=function(e,t){this.lines=l(this.chars,this.errors,e,t),T=!0},this.parse=function(e,t,r){if(!T)throw Error(`${n}grammar not scanned`);h.syntax(this.chars,this.lines,this.errors,e,t,r),E=!0},this.translate=function(){if(!E)throw Error(`${n}grammar not scanned and parsed`);let e=h.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=e.rules,this.udts=e.udts,t=e.lineMap,A=!0)},this.attributes=function(){if(!A)throw Error(`${n}grammar not scanned, parsed and translated`);return S=u(this.rules,this.udts,t,this.errors),w=!0,S},this.generate=function(e){if(this.lines=l(this.chars,this.errors,e),this.errors.length||(h.syntax(this.chars,this.lines,this.errors,e),this.errors.length))return;let r=h.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=r.rules,this.udts=r.udts,t=r.lineMap,S=u(this.rules,this.udts,t,this.errors),w=!0)},this.displayRules=function(e="index"){if(!A)throw Error(`${n}grammar not scanned, parsed and translated`);return f(this.rules,this.udts,e)},this.displayRuleDependencies=function(e="index"){if(!w)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return p(e)},this.displayAttributes=function(e="index"){if(!w)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return S&&d(e),c(e)},this.displayAttributeErrors=function(){if(!w)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return d()},this.toSource=function(e){if(!w)throw Error(`${n}can't generate parser source - must be preceeded by call to attributes()`);if(S)throw Error(`${n}can't generate parser source - attributes have ${S} errors`);return h.generateSource(this.chars,this.lines,this.rules,this.udts,e)},this.toObject=function(){if(!w)throw Error(`${n}can't generate parser source - must be preceeded by call to attributes()`);if(S)throw Error(`${n}can't generate parser source - attributes have ${S} errors`);return h.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return v(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return x(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return y(this.lines)},this.linesToHtml=function(){return b(this.lines)}}},76406:function(e,t,r){e.exports=function(){let e=r(74398),{ruleAttributes:t,showAttributes:s,showAttributeErrors:n}=r(80677),{ruleDependencies:i,showRuleDependencies:o}=r(42175);class a{constructor(e,t){this.rules=e,this.udts=t,this.ruleCount=e.length,this.udtCount=t.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let t=0;t0)for(let r=0;r0)for(let r=0;rthis.rules[t].lower?1:0}compUdtsAlpha(e,t){return this.udts[e].lowerthis.udts[t].lower?1:0}compRulesType(e,t){return this.ruleDeps[e].recursiveTypethis.ruleDeps[t].recursiveType?1:0}compRulesGroup(t,r){if(this.ruleDeps[t].recursiveType===e.ATTR_MR&&this.ruleDeps[r].recursiveType===e.ATTR_MR){if(this.ruleDeps[t].groupNumberthis.ruleDeps[r].groupNumber)return 1}return 0}}return{attributes:function(e=[],r=[],s=[],n=[]){let o=new a(e,r);return i(o),t(o),o.attrsErrorCount&&n.push({line:0,char:0,msg:`${o.attrsErrorCount} attribute errors`}),o.attrsErrorCount},showAttributes:s,showAttributeErrors:n,showRuleDependencies:o}}()},39552:function(e,t,r){e.exports=function(){let e=r(33817),t=e.ids,s=new(r(97269)),n=new(r(65308)),i=new(r(18567)),o=new e.parser;o.ast=new e.ast,o.callbacks=s.callbacks,o.ast.callbacks=n.callbacks;let a=function(e,t,r){if(t<0||t>=r)return -1;for(let r=0;r=e[r].beginChar&&t{let r=[],s=[],n=0;e.opcodes.forEach(e=>{e.type===t.ALT&&1===e.children.length?s.push(null):e.type===t.CAT&&1===e.children.length?s.push(null):e.type===t.REP&&1===e.min&&1===e.max?s.push(null):(s.push(n),r.push(e),n+=1)}),s.push(n),r.forEach(e=>{if(e.type===t.ALT||e.type===t.CAT)for(let t=0;t{g.push(e.lower),p+=e.opcodes.length,e.opcodes.forEach(e=>{switch(e.type){case t.ALT:b+=1;break;case t.CAT:x+=1;break;case t.RNM:v+=1;break;case t.UDT:T+=1;break;case t.REP:E+=1;break;case t.AND:A+=1;break;case t.NOT:w+=1;break;case t.BKA:O+=1;break;case t.BKN:L+=1;break;case t.BKR:M+=1;break;case t.ABG:P+=1;break;case t.AEN:$+=1;break;case t.TLS:for(S+=1,o=0;om&&(m=e.string[o]);break;case t.TBS:for(k+=1,o=0;om&&(m=e.string[o]);break;case t.TRG:C+=1,e.minm&&(m=e.max);break;default:throw Error("generateSource: unrecognized opcode")}})}),g.sort(),n.length>0&&(n.forEach(e=>{y.push(e.lower)}),y.sort()),u+="// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved
\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\n",i?i.funcName?u+=`const ${i.funcName} = function grammar(){ `:c?u+="export function grammar(){\n":d?u+="export default function grammar(){\n":u+=`module.exports = function grammar(){ `:u+=`module.exports = function grammar(){ `,u+=` // \`\`\` // SUMMARY // rules = ${s.length} // udts = ${n.length} // opcodes = ${p} // --- ABNF original opcodes // ALT = ${b} // CAT = ${x} // REP = ${E} // RNM = ${v} // TLS = ${S} // TBS = ${k} // TRG = ${C} // --- SABNF superset opcodes // UDT = ${T} // AND = ${A} // NOT = ${w} `,d||(u+=` // BKA = ${O} // BKN = ${L} // BKR = ${M} // ABG = ${P} // AEN = ${$} `),u+=" // characters = [",S+k+C===0?u+=" none defined ]":u+=`${f} - ${m}]`,T>0&&(u+=" + user defined"),u+="\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n",s.forEach((e,t)=>{let r=" this.rules[";r+=t+"] = { name: '"+e.name+"', lower: '"+e.lower+"', index: "+e.index+", isBkr: "+e.isBkr+" };\n",u+=r}),u+="\n /* UDTS */\n this.udts = [];\n",n.length>0&&n.forEach((e,t)=>{let r=" this.udts[";r+=t+"] = { name: '"+e.name+"', lower: '"+e.lower+"', index: "+e.index+", empty: "+e.empty+", isBkr: "+e.isBkr+" };\n",u+=r}),u+="\n /* OPCODES */\n",s.forEach((e,r)=>{r>0&&(u+="\n"),u+=` /* ${e.name} */ this.rules[${r}].opcodes = []; `,e.opcodes.forEach((e,i)=>{let o;switch(e.type){case t.ALT:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, children: [${e.children.toString()}] };// ALT `;break;case t.CAT:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, children: [${e.children.toString()}] };// CAT `;break;case t.RNM:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, index: ${e.index} };// RNM(${s[e.index].name}) `;break;case t.BKR:e.index>=s.length?(a=n[e.index-s.length].name,l=n[e.index-s.length].lower):(a=s[e.index].name,l=s[e.index].lower),o="%i",e.bkrCase===t.BKR_MODE_CS&&(o="%s"),e.bkrMode===t.BKR_MODE_UM?o+="%u":o+="%p",a=o+a,u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, index: ${e.index}, lower: '${l}', bkrCase: ${e.bkrCase}, bkrMode: ${e.bkrMode} };// BKR(\\${a}) `;break;case t.UDT:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, empty: ${e.empty}, index: ${e.index} };// UDT(${n[e.index].name}) `;break;case t.REP:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// REP `;break;case t.AND:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// AND `;break;case t.NOT:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// NOT `;break;case t.ABG:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// ABG(%^) `;break;case t.AEN:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// AEN(%$) `;break;case t.BKA:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// BKA `;break;case t.BKN:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// BKN `;break;case t.TLS:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, string: [${e.string.toString()}] };// TLS `;break;case t.TBS:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, string: [${e.string.toString()}] };// TBS `;break;case t.TRG:u+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// TRG `;break;default:throw Error("parser.js: ~143: unrecognized opcode")}})}),u+='\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString(){\n let str = "";\n',r.forEach(t=>{let r=t.beginChar+t.length;h="",u+=' str += "';for(let s=t.beginChar;s{n.push(e.lower)}),n.sort(),r.length>0&&(r.forEach(e=>{i.push(e.lower)}),i.sort()),s.callbacks=[],n.forEach(e=>{s.callbacks[e]=!1}),r.length>0&&i.forEach(e=>{s.callbacks[e]=!1}),s.rules=t,s.udts=r,s.toString=function(){return o},s}}},80677:function(e,t,r){e.exports=function(){let e=r(74398),t=null;function s(e){return!e.left&&!e.nested&&!e.right&&!e.cyclic&&e.empty}function n(e){return!!e.left||!!e.nested||!!e.right||!!e.cyclic}let i=e=>e?"t":"f",o=e=>e?"e":"f",a=e=>e?"t":"e",l=(r,s,n,l)=>`${r}:${s}:`+(`${o(n.left)} ${i(n.nested)} ${i(n.right)} ${o(n.cyclic)} ${a(n.finite)} ${i(n.empty)}:${t.typeToString(l.recursiveType)}:`+(l.recursiveType===e.ATTR_MR?l.groupNumber:"-"))+`:${n.rule.name} `,h=()=>"LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n",u=e=>{let r=0,s=0,n=null,i=null,o="",{ruleIndexes:a}=t;for(97===e?a=t.ruleAlphaIndexes:116===e&&(a=t.ruleTypeIndexes),r=0;r{let i=0,o=0,a=(t=r).attrGen();for(i=0;i=0;r-=1){if(e[r].right)return!0;if(!e[r].empty)break}return!1}(u,h),o.nested=function(e,t){let r=0,i=0,o=0;for(r=0;r=0;r-=1)if(e[r].left&&!e[r].leaf){for(i=r-1;i>=0;i-=1)if(!s(e[i]))return!0}for(r=0;r=e.ruleCount?(n.empty=e.udts[i.index-e.ruleCount].empty,n.finite=!0):(t(e,i.index,n),n.left=!1,n.nested=!1,n.right=!1,n.cyclic=!1)}(i,o,a,l);break;case e.AND:case e.NOT:case e.BKA:case e.BKN:r(i,o,a+1,l),l.empty=!0;break;case e.TLS:l.empty=!o[a].string.length,l.finite=!0,l.cyclic=!1;break;case e.TBS:case e.TRG:l.empty=!1,l.finite=!0,l.cyclic=!1;break;case e.UDT:l.empty=h.empty,l.finite=!0,l.cyclic=!1;break;case e.ABG:case e.AEN:l.empty=!0,l.finite=!0,l.cyclic=!1;break;default:throw Error(`unknown opcode type: ${h}`)}}(r,a.rule.opcodes,0,o),a.left=o.left,a.right=o.right,a.nested=o.nested,a.empty=o.empty,a.finite=o.finite,a.cyclic=o.cyclic,a.leaf=!1,a.isOpen=!1,a.isComplete=!0)}(t,i,a),t.attrCopy(t.attrs[i],t.attrsWorking[i])}t.attributesComplete=!0;let l=null;for(i=0;i{if(!t.attributesComplete)throw Error("rule-attributes.js:showAttributes: attributes not available");let r="",s="RULE ATTRIBUTES\n";return 97===e.charCodeAt(0)?r+="alphabetical by rule name\n"+s+h()+u(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+s+h()+u(116):r+="ordered by rule index\n"+s+h()+u(),r},showAttributeErrors:()=>{let e=null,r=null,s="";if(s+="RULE ATTRIBUTES WITH ERRORS\n"+h(),t.attrsErrorCount)for(let n=0;n{let e=r(74398),t=null,s=(t,r,n,i)=>{let o=0,a=0,l=r[n];i[n]=!0;let h=l.rule.opcodes;for(o=0;o{let r=0,s=0,n=0,i=0,o=t.ruleCount-1,a=t.udtCount-1,l="",h="",u=!1,c=null,{ruleIndexes:d}=t,{udtIndexes:p}=t;for(97===e?(d=t.ruleAlphaIndexes,p=t.udtAlphaIndexes):116===e&&(d=t.ruleTypeIndexes,p=t.udtAlphaIndexes),r=0;r-1?c.groupNumber:"-")+":"),h+=" ",l+=`${h+t.rules[d[r]].name} `,u=!0,n=0,i=l.length,l+=h,s=0;s "+t.ruleDeps[d[s]].rule.name):l+=`, ${t.ruleDeps[d[s]].rule.name}`,n+=1),l.length-i>100&&s!==o&&(l+=` ${h}=> `,i=l.length);if(t.udtCount)for(s=0;s "+t.udts[p[s]].name):l+=`, ${t.udts[p[s]].name}`,n+=1),l.length-i>100&&s!==a&&(l+=` ${h}=> `,i=l.length);for(0===n&&(l+="=> \n"),!1===u&&(l+="\n"),u=!0,n=0,i=l.length,l+=h,s=0;s100&&s!==o&&(l+=` ${h}=> `,i=l.length);0===n&&(l+="<= \n"),!1===u&&(l+="\n"),l+="\n"}return l};return{ruleDependencies:r=>{let n=0,i=0,o=0,a=null,l=null,h=!1;(t=r).dependenciesComplete=!1;let u=t.falseArray(t.ruleCount);for(n=0;n-1,t.ruleAlphaIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesType),t.isMutuallyRecursive&&t.ruleTypeIndexes.sort(t.compRulesGroup),t.udtCount&&t.udtAlphaIndexes.sort(t.compUdtsAlpha),t.dependenciesComplete=!0},showRuleDependencies:(e="index")=>{let r="RULE DEPENDENCIES(index:type:[group number:])\n";return r+="=> refers to rule names\n<= referenced by rule names\n",t.dependenciesComplete&&(97===e.charCodeAt(0)?r+="alphabetical by rule name\n"+n(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+n(116):r+="ordered by rule index\n"+n(null)),r}}})()},18567:function(e){e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function(){return";\n; ABNF for JavaScript APG 2.0 SABNF\n; RFC 5234 with some restrictions and additions.\n; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n; - accepts %s\"string\" as a case-sensitive string\n; - accepts %i\"string\" as a case-insensitive string\n; - accepts \"string\" as a case-insensitive string\n;\n; Some restrictions:\n; 1. Rules must begin at first character of each line.\n; Indentations on first rule and rules thereafter are not allowed.\n; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n; 3. Prose values, i.e. , are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n; e.g. &%d13 or &rule or !(A / B)\n; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n; u_name may be used as an element but no rule definition is given.\n; e.g. rule = A / u_myUdt\n; A = \"a\"\n; would be a valid grammar.\n; 3. Case-sensitive, single-quoted strings are accepted.\n; e.g. 'abc' would be equivalent to %d97.98.99\n; (kept for backward compatibility, but superseded by %s\"abc\") \n; New 12/26/2015\n; 4. Look-behind operators are accepted as element prefixes.\n; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n; e.g. &&%d13 or &&rule or !!(A / B)\n; 5. Back reference operators, i.e. \\rulename, are accepted.\n; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n; to match is a phrase previously matched by the rule 'rulename'.\n; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n; Back reference modifiers can be used to specify case and mode.\n; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n; 8. String end anchor, AEN(%$) matches the end of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n;\nFile = *(BlankLine / Rule / RuleError)\nBlankLine = *(%d32/%d9) [comment] LineEnd\nRule = RuleLookup owsp Alternation ((owsp LineEnd)\n / (LineEndError LineEnd))\nRuleLookup = RuleNameTest owsp DefinedAsTest\nRuleNameTest = RuleName/RuleNameError\nRuleName = alphanum\nRuleNameError = 1*(%d33-60/%d62-126)\nDefinedAsTest = DefinedAs / DefinedAsError\nDefinedAsError = 1*2%d33-126\nDefinedAs = IncAlt / Defined\nDefined = %d61\nIncAlt = %d61.47\nRuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\nLineEndError = 1*(%d32-126 / %d9 / LineContinue)\nAlternation = Concatenation *(owsp AltOp Concatenation)\nConcatenation = Repetition *(CatOp Repetition)\nRepetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\nModifier = (Predicate [RepOp])\n / RepOp\nPredicate = BkaOp\n / BknOp\n / AndOp\n / NotOp\nBasicElement = UdtOp\n / RnmOp\n / TrgOp\n / TbsOp\n / TlsOp\n / ClsOp\n / BkrOp\n / AbgOp\n / AenOp\n / ProsVal\nBasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\nGroup = GroupOpen Alternation (GroupClose / GroupError)\nGroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nGroupOpen = %d40 owsp\nGroupClose = owsp %d41\nOption = OptionOpen Alternation (OptionClose / OptionError)\nOptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nOptionOpen = %d91 owsp\nOptionClose = owsp %d93\nRnmOp = alphanum\nBkrOp = %d92 [bkrModifier] bkr-name\nbkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\ncs = '%s'\nci = '%i'\num = '%u'\npm = '%p'\nbkr-name = uname / ename / rname\nrname = alphanum\nuname = %d117.95 alphanum\nename = %d101.95 alphanum\nUdtOp = udt-empty\n / udt-non-empty\nudt-non-empty = %d117.95 alphanum\nudt-empty = %d101.95 alphanum\nRepOp = (rep-min StarOp rep-max)\n / (rep-min StarOp)\n / (StarOp rep-max)\n / StarOp\n / rep-min-max\nAltOp = %d47 owsp\nCatOp = wsp\nStarOp = %d42\nAndOp = %d38\nNotOp = %d33\nBkaOp = %d38.38\nBknOp = %d33.33\nAbgOp = %d37.94\nAenOp = %d37.36\nTrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\nTbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\nTlsOp = TlsCase TlsOpen TlsString TlsClose\nTlsCase = [\"%i\" / \"%s\"]\nTlsOpen = %d34\nTlsClose = %d34\nTlsString = *(%d32-33/%d35-126/StringTab)\nStringTab = %d9\nClsOp = ClsOpen ClsString ClsClose\nClsOpen = %d39\nClsClose = %d39\nClsString = *(%d32-38/%d40-126/StringTab)\nProsVal = ProsValOpen ProsValString ProsValClose\nProsValOpen = %d60\nProsValString = *(%d32-61/%d63-126/StringTab)\nProsValClose = %d62\nrep-min = rep-num\nrep-min-max = rep-num\nrep-max = rep-num\nrep-num = 1*(%d48-57)\ndString = dnum\nxString = xnum\nbString = bnum\nDec = (%d68/%d100)\nHex = (%d88/%d120)\nBin = (%d66/%d98)\ndmin = dnum\ndmax = dnum\nbmin = bnum\nbmax = bnum\nxmin = xnum\nxmax = xnum\ndnum = 1*(%d48-57)\nbnum = 1*%d48-49\nxnum = 1*(%d48-57 / %d65-70 / %d97-102)\n;\n; Basics\nalphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\nowsp = *space\nwsp = 1*space\nspace = %d32\n / %d9\n / comment\n / LineContinue\ncomment = %d59 *(%d32-126 / %d9)\nLineEnd = %d13.10\n / %d10\n / %d13\nLineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},43138:function(e,t,r){let s=r(74398),n=r(94813),i=[];i.line=function(e,t,r,n,i){return e===s.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:i.textLength,endType:i.endType,invalidChars:i.invalidCount}),s.SEM_OK},i["line-text"]=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.textLength=n),s.SEM_OK},i["last-line"]=function(e,t,r,n,i){return e===s.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.strict?(i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:n,endType:"none",invalidChars:i.invalidCount}),i.errors.push({line:i.lineNo,char:r+n,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(t.push(10),i.lines.push({lineNo:i.lines.length,beginChar:r,length:n+1,textLength:n,endType:"LF",invalidChars:i.invalidCount})),s.SEM_OK},i.invalid=function(e,t,r,i,o){return e===s.SEM_PRE&&o.errors.push({line:o.lineNo,char:r,msg:`invalid character found '\\x${n.charToHex(t[r])}'`}),s.SEM_OK},i.end=function(e,t,r,n,i){return e===s.SEM_POST&&(i.lineNo+=1),s.SEM_OK},i.lf=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="LF",i.strict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),s.SEM_OK},i.cr=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="CR",i.strict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),s.SEM_OK},i.crlf=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="CRLF"),s.SEM_OK},t.callbacks=i},25256:function(e){e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function(){return"file = *line [last-line]\nline = line-text end\nline-text = *(valid/invalid)\nlast-line = 1*(valid/invalid)\nvalid = %d32-126 / %d9\ninvalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\nend = CRLF / LF / CR\nCRLF = %d13.10\nLF = %d10\nCR = %d13\n"}}},70571:function(e,t,r){e.exports=function(e,t,s,n){let i=r(33817),o=new(r(25256)),{callbacks:a}=r(43138),l=[],h=new i.parser;if(h.ast=new i.ast,h.ast.callbacks=a,n){if("traceObject"!==n.traceObject)throw TypeError("scanner.js: trace argument is not a trace object");h.trace=n}if(!0!==h.parse(o,"file",e).success){t.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}return h.ast.translate({lines:l,lineNo:0,errors:t,strict:!!s}),l}},65308:function(e,t,r){e.exports=function(){let e=r(33817),t=e.ids,s=function(){this.names=[],this.add=function(e){let t=-1;return -1===this.get(e)&&(t={name:e,lower:e.toLowerCase(),index:this.names.length},this.names.push(t)),t},this.get=function(e){let t=-1,r=e.toLowerCase();for(let e=0;e=48&&t<=57)t-=48;else if(t>=65&&t<=70)t-=55;else if(t>=97&&t<=102)t-=87;else throw Error("hexnum out of range");s=16*s+t}return s};this.callbacks=[],this.callbacks.abgop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.ABG}),o},this.callbacks.aenop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.AEN}),o},this.callbacks.alternation=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_PRE)for(;;){if(null===i.definedas){o=t.SEM_SKIP;break}if(null===i.topStack){if("="===i.definedas){i.topStack={alt:{type:t.ALT,children:[]},cat:null},i.altStack.push(i.topStack),i.opcodes.push(i.topStack.alt);break}i.topStack={alt:i.opcodes[0],cat:null},i.altStack.push(i.topStack);break}i.topStack={alt:{type:t.ALT,children:[]},cat:null},i.altStack.push(i.topStack),i.opcodes.push(i.topStack.alt);break}else e===t.SEM_POST&&(i.altStack.pop(),i.altStack.length>0?i.topStack=i.altStack[i.altStack.length-1]:i.topStack=null);return o},this.callbacks.andop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.AND}),o},this.callbacks.bmax=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=i(r,s,n)),a},this.callbacks.bmin=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=i(r,s,n)),a},this.callbacks.bkaop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.BKA}),o},this.callbacks.bknop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.BKN}),o},this.callbacks.bkrop=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_PRE?(o.ci=!0,o.cs=!1,o.um=!0,o.pm=!1):r===t.SEM_POST&&o.opcodes.push({type:t.BKR,bkrCase:!0===o.cs?t.BKR_MODE_CS:t.BKR_MODE_CI,bkrMode:!0===o.pm?t.BKR_MODE_PM:t.BKR_MODE_UM,index:{phraseIndex:o.bkrname.phraseIndex,name:e.utils.charsToString(s,o.bkrname.phraseIndex,o.bkrname.phraseLength)}}),a},this.callbacks["bkr-name"]=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.bkrname={phraseIndex:s,phraseLength:n}),o},this.callbacks.bstring=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&o.tbsstr.push(i(r,s,n)),a},this.callbacks.clsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(n<=2?i.opcodes.push({type:t.TLS,string:[]}):i.opcodes.push({type:t.TBS,string:r.slice(s+1,s+n-1)})),o},this.callbacks.ci=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.ci=!0),o},this.callbacks.cs=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.cs=!0),o},this.callbacks.um=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.um=!0),o},this.callbacks.pm=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.pm=!0),o},this.callbacks.concatenation=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.topStack.alt.children.push(i.opcodes.length),i.topStack.cat={type:t.CAT,children:[]},i.opcodes.push(i.topStack.cat)):e===t.SEM_POST&&(i.topStack.cat=null),o},this.callbacks.defined=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.definedas="="),o},this.callbacks.dmax=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i)),a},this.callbacks.dmin=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=n(r,s,i)),a},this.callbacks.dstring=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&o.tbsstr.push(n(r,s,i)),a},this.callbacks.file=function(e,r,n,i,o){let a=t.SEM_OK;if(e===t.SEM_PRE)o.ruleNames=new s,o.udtNames=new s,o.rules=[],o.udts=[],o.rulesLineMap=[],o.opcodes=[],o.altStack=[],o.topStack=null,o.topRule=null;else if(e===t.SEM_POST){let e;o.rules.forEach(r=>{r.isBkr=!1,r.opcodes.forEach(r=>{r.type===t.RNM&&(-1===(e=o.ruleNames.get(r.index.name))?(o.errors.push({line:o.findLine(o.lines,r.index.phraseIndex,o.charsLength),char:r.index.phraseIndex,msg:`Rule name '${r.index.name}' used but not defined.`}),r.index=-1):r.index=e.index)})}),o.udts.forEach(e=>{e.isBkr=!1}),o.rules.forEach(r=>{r.opcodes.forEach(s=>{s.type===t.BKR&&(r.hasBkr=!0,-1!==(e=o.ruleNames.get(s.index.name))?(o.rules[e.index].isBkr=!0,s.index=e.index):-1!==(e=o.udtNames.get(s.index.name))?(o.udts[e.index].isBkr=!0,s.index=o.rules.length+e.index):(o.errors.push({line:o.findLine(o.lines,s.index.phraseIndex,o.charsLength),char:s.index.phraseIndex,msg:`Back reference name '${s.index.name}' refers to undefined rule or unamed UDT.`}),s.index=-1))})})}return a},this.callbacks.incalt=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.definedas="=/"),o},this.callbacks.notop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.NOT}),o},this.callbacks.optionopen=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.REP,min:0,max:1,char:s}),o},this.callbacks["rep-max"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i)),a},this.callbacks["rep-min"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=n(r,s,i)),a},this.callbacks["rep-min-max"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i),o.min=o.max),a},this.callbacks.repetition=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&i.topStack.cat.children.push(i.opcodes.length),o},this.callbacks.repop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.min=0,i.max=1/0,i.topRep={type:t.REP,min:0,max:1/0},i.opcodes.push(i.topRep)):e===t.SEM_POST&&(i.min>i.max&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`repetition min cannot be greater than max: min: ${i.min}: max: ${i.max}`}),i.topRep.min=i.min,i.topRep.max=i.max),o},this.callbacks.rnmop=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_POST&&o.opcodes.push({type:t.RNM,index:{phraseIndex:n,name:e.utils.charsToString(s,n,i)}}),a},this.callbacks.rule=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&(i.altStack.length=0,i.topStack=null,i.rulesLineMap.push({line:i.findLine(i.lines,s,i.charsLength),char:s})),o},this.callbacks.rulelookup=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_PRE)i.ruleName="",i.definedas="";else if(e===t.SEM_POST){let e;"="===i.definedas?-1===(e=i.ruleNames.add(i.ruleName))?(i.definedas=null,i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`Rule name '${i.ruleName}' previously defined.`})):(i.topRule={name:e.name,lower:e.lower,opcodes:[],index:e.index},i.rules.push(i.topRule),i.opcodes=i.topRule.opcodes):-1===(e=i.ruleNames.get(i.ruleName))?(i.definedas=null,i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`Rule name '${i.ruleName}' for incremental alternate not previously defined.`})):(i.topRule=i.rules[e.index],i.opcodes=i.topRule.opcodes)}return o},this.callbacks.rulename=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_PRE&&(o.ruleName=e.utils.charsToString(s,n,i)),a},this.callbacks.tbsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?i.tbsstr=[]:e===t.SEM_POST&&i.opcodes.push({type:t.TBS,string:i.tbsstr}),o},this.callbacks.tlscase=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&n>0&&(83===r[s+1]||115===r[s+1])&&(i.tlscase=!1),o},this.callbacks.tlsstring=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_POST){if(i.tlscase){let e=r.slice(s,s+n);for(let t=0;t=65&&e[t]<=90&&(e[t]+=32);i.opcodes.push({type:t.TLS,string:e})}else i.opcodes.push({type:t.TBS,string:r.slice(s,s+n)})}return o},this.callbacks.tlsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&(i.tlscase=!0),o},this.callbacks.trgop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.min=0,i.max=0):e===t.SEM_POST&&(i.min>i.max&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${i.min}: max: ${i.max}`}),i.opcodes.push({type:t.TRG,min:i.min,max:i.max})),o},this.callbacks["udt-empty"]=function(r,s,n,i,o){let a=t.SEM_OK;if(r===t.SEM_POST){let r=e.utils.charsToString(s,n,i),a=o.udtNames.add(r);if(-1===a){if(-1===(a=o.udtNames.get(r)))throw Error("semUdtEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!0});o.opcodes.push({type:t.UDT,empty:!0,index:a.index})}return a},this.callbacks["udt-non-empty"]=function(r,s,n,i,o){let a=t.SEM_OK;if(r===t.SEM_POST){let r=e.utils.charsToString(s,n,i),a=o.udtNames.add(r);if(-1===a){if(-1===(a=o.udtNames.get(r)))throw Error("semUdtNonEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!1});o.opcodes.push({type:t.UDT,empty:!1,index:a.index,syntax:null,semantic:null})}return a},this.callbacks.xmax=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&(i.max=o(r,s,n)),a},this.callbacks.xmin=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&(i.min=o(r,s,n)),a},this.callbacks.xstring=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&i.tbsstr.push(o(r,s,n)),a}}},97759:function(e){e.exports=function(){let e="show-rules.js";return function(t=[],r=[],s="index"){let n;let i="showRules",o=[],a=[],l=[],h=[],u=t.length,c=r.length,d="RULE/UDT NAMES";if(!(Array.isArray(t)&&t.length))throw Error(`${e}:${i}: rules arg must be array with length > 0`);if(!Array.isArray(r))throw Error(`${e}:${i}: udts arg must be array`);for(n=0;nt[r].lower?1:0}),c){for(n=0;nr[t].lower?1:0})}if(97===s.charCodeAt(0)){for(d+=" - alphabetical by rule/UDT name\n",n=0;n) opened but not closed."}),e.basicError=!0,e.prosValOpen=null;break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,e.prosValOpen),char:e.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),e.prosValOpen=null;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(r,s,i){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e.prosValOpen=i;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==i.stringTabChar&&i.errors.push({line:i.findLine(i.lines,i.stringTabChar),char:i.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.repetition=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:case n.MATCH:i.repCount+=1;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rule=function(r,s,i,o){switch(r.state){case n.ACTIVE:o.altStack.length=0,e={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(e);break;case n.EMPTY:throw Error(`${t}synRule: EMPTY: rule cannot be empty`);case n.NOMATCH:break;case n.MATCH:o.ruleCount+=1;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.stringTabChar=s;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.tlsOpen),char:e.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),e.basicError=!0,e.tlsOpen=null;break;case n.MATCH:e.tlsOpen=null;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(r,s,i){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e.tlsOpen=i;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==i.stringTabChar&&i.errors.push({line:i.findLine(i.lines,i.stringTabChar),char:i.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.udtop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(o.strict){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`UDT operator found(${t}) - strict ABNF specified.`})}break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Positive look-behind operator(&&) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Positive look-behind operator(&&) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bknop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Negative look-behind operator(!!) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Negative look-behind operator(!!) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(o.strict){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Back reference operator(${t}) found - strict ABNF specified.`})}else if(o.lite){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Back reference operator(${t}) found - apg-lite specified.`})}break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.abgop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Beginning of string anchor(%^) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Beginning of string anchor(%^) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.aenop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"End of string anchor(%$) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"End of string anchor(%$) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}}}},95926:function(e,t,r){let{Buffer:s}=r(82957),n=r(11968),i="UTF8",o="UTF16",a="UTF16BE",l="UTF16LE",h="UTF32",u="UTF32BE",c="UTF32LE",d="UINT7",p="ASCII",f="BINARY",m="UINT8",g="UINT16",y="UINT16LE",b="UINT16BE",x="UINT32",v="UINT32LE",T="UINT32BE",E="ESCAPED",A="STRING",w=function(e){e.type=i;let t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)},S=function(e){let t=e.data;switch(e.bom=0,e.type){case o:e.type=a,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=l,e.bom=2));break;case a:if(e.type=a,t.length>=2){if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw TypeError(`src type: "${a}" specified but BOM is for "${l}"`)}break;case l:if(e.type=l,t.length>=0){if(254===t[0]&&255===t[1])throw TypeError(`src type: "${l}" specified but BOM is for "${a}"`);255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}},k=function(e){let t=e.data;switch(e.bom=0,e.type){case h:e.type=u,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=c,e.bom=4));break;case u:if(e.type=u,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw TypeError(`src type: ${u} specified but BOM is for ${c}"`);break;case c:if(e.type=c,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw TypeError(`src type: "${c}" specified but BOM is for "${u}"`);255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}},C=function(e,t){let r=function(e){let t={type:"",base64:!1},r=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return r&&(r[2]&&(t.type=r[2].toUpperCase()),r[1]&&(t.base64=!0)),t}(e.toUpperCase());if(r.base64){if(r.type===A)throw TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${A}`);if(s.isBuffer(t))r.data=n.base64.decode(t);else if("string"==typeof t){let e=s.from(t,"ascii");r.data=n.base64.decode(e)}else throw TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof t}`)}else r.data=t;switch(r.type){case i:w(r);break;case o:case a:case l:S(r);break;case h:case u:case c:k(r);break;case g:r.type=b;break;case x:r.type=T;break;case p:r.type=d;break;case f:r.type=m;break;case d:case m:case y:case b:case v:case T:case A:case E:break;default:throw TypeError(`type: "${e}" not recognized`)}if(r.type===A){if("string"!=typeof r.data)throw TypeError(`type: "${e}" but data is not a string`)}else if(!s.isBuffer(r.data))throw TypeError(`type: "${e}" but data is not a Buffer`);return r},M=function(e,t){if(!Array.isArray(t))throw TypeError(`dst chars: not array: "${typeof t}`);if("string"!=typeof e)throw TypeError(`dst type: not string: "${typeof e}`);let r=function(e){let t,r;let s={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(r=e,"CRLF:"===(t=e.slice(0,5))){s.crlf=!0,r=e.slice(5);break}"LF:"===(t=e.slice(0,3))&&(s.lf=!0,r=e.slice(3));break}return 1===(t=r.split(":")).length?s.type=t[0]:2===t.length&&"BASE64"===t[1]&&(s.base64=!0,s.type=t[0]),s}(e.toUpperCase());switch(r.type){case i:case a:case l:case u:case c:case d:case m:case y:case b:case v:case T:case E:break;case A:if(r.base64)throw TypeError(`":BASE64" suffix not allowed with type ${A}`);break;case p:r.type=d;break;case f:r.type=m;break;case o:r.type=a;break;case h:r.type=u;break;case g:r.type=b;break;case x:r.type=T;break;default:throw TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return r},O=function(e,t){switch(e){case i:return n.utf8.encode(t);case a:return n.utf16be.encode(t);case l:return n.utf16le.encode(t);case u:return n.utf32be.encode(t);case c:return n.utf32le.encode(t);case d:return n.uint7.encode(t);case m:return n.uint8.encode(t);case b:return n.uint16be.encode(t);case y:return n.uint16le.encode(t);case T:return n.uint32be.encode(t);case v:return n.uint32le.encode(t);case A:return n.string.encode(t);case E:return n.escaped.encode(t);default:throw TypeError(`encode type "${e}" not recognized`)}},L=function(e){switch(e.type){case i:return n.utf8.decode(e.data,e.bom);case l:return n.utf16le.decode(e.data,e.bom);case a:return n.utf16be.decode(e.data,e.bom);case u:return n.utf32be.decode(e.data,e.bom);case c:return n.utf32le.decode(e.data,e.bom);case d:return n.uint7.decode(e.data);case m:return n.uint8.decode(e.data);case b:return n.uint16be.decode(e.data);case y:return n.uint16le.decode(e.data);case T:return n.uint32be.decode(e.data);case v:return n.uint32le.decode(e.data);case A:return n.string.decode(e.data);case E:return n.escaped.decode(e.data);default:throw TypeError(`decode type "${e.type}" not recognized`)}};t.decode=function(e,t){return L(C(e,t))},t.encode=function(e,t){let r,s;let i=M(e,t);return i.crlf?(r=n.lineEnds.crlf(t),s=O(i.type,r)):i.lf?(r=n.lineEnds.lf(t),s=O(i.type,r)):s=O(i.type,t),i.base64&&(s=n.base64.encode(s)),s},t.convert=function(e,r,s){return t.encode(s,t.decode(e,r))}},11968:function(e,t,r){let{Buffer:s}=r(82957),n=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],i=[];"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(e=>{i.push(e.charCodeAt(0))}),t.utf8={encode(e){let t=[];return e.forEach(e=>{if(e>=0&&e<=127)t.push(e);else if(e<=2047)t.push(192+(e>>6&31)),t.push(128+(63&e));else if(e<55296||e>57343&&e<=65535)t.push(224+(e>>12&15)),t.push(128+(e>>6&63)),t.push(128+(63&e));else if(e>=65536&&e<=1114111){let r=e>>16&31;t.push(240+(r>>2)),t.push(128+((3&r)<<4)+(e>>12&15)),t.push(128+(e>>6&63)),t.push(128+(63&e))}else throw RangeError(`utf8.encode: character out of range: char: ${e}`)}),s.from(t)},decode(e,t){let r,s,n,i,o,a;let l=e.length,h=t?3:0,u=[];for(;h=0&&s<=127){r=s,a=1;break}if((n=h+1)=194&&s<=223){r=function(e,t){if((192&t)!=128)return 4294967293;let r=((31&e)<<6)+(63&t);return r<128?4294967292:r}(s,e[n]),a=2;break}if((i=h+2)=224&&s<=239){r=function(e,t,r){if((192&r)!=128||(192&t)!=128)return 4294967293;let s=((15&e)<<12)+((63&t)<<6)+(63&r);return s<2048?4294967292:s>=55296&&s<=57343?4294967294:s}(s,e[n],e[i]),a=3;break}(o=h+3)=240&&s<=244&&(r=function(e,t,r,s){if((192&s)!=128||(192&r)!=128||(192&t)!=128)return 4294967293;let n=(((7&e)<<2)+(t>>4&3)<<16)+((15&t)<<12)+((63&r)<<6)+(63&s);return n<65536?4294967292:n>1114111?4294967294:n}(s,e[n],e[i],e[o]),a=4);break}if(r>1114111){let e=`byte[${h}]`;if(4294967295===r)throw RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(4294967293===r)throw RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(4294967294===r)throw RangeError(`utf8.decode: code point out of range found at: ${e}`);if(4294967292===r)throw RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw RangeError(`utf8.decode: unrecognized error found at: ${e}`)}u.push(r),h+=a}return u}},t.utf16be={encode(e){let t,r,n;let i=[];for(let s=0;s=0&&t<=55295||t>=57344&&t<=65535)i.push(t>>8&255),i.push(255&t);else if(t>=65536&&t<=1114111)r=55296+((n=t-65536)>>10),n=56320+(1023&n),i.push(r>>8&255),i.push(255&r),i.push(n>>8&255),i.push(255&n);else throw RangeError(`utf16be.encode: UTF16BE value out of range: char[${s}]: ${t}`);return s.from(i)},decode(e,t){let r,s,n,i,o,a;if(e.length%2>0)throw RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${e.length}`);let l=[],h=e.length,u=t?2:0,c=0;for(;u57343){r=o,s=2;break}if((i=u+3)=56320&&a<=57343)){r=65536+(o-55296<<10)+(a-56320),s=4;break}}throw RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${u}]`)}l[c++]=r,u+=s}return l}},t.utf16le={encode(e){let t,r,n;let i=[];for(let s=0;s=0&&t<=55295||t>=57344&&t<=65535)i.push(255&t),i.push(t>>8&255);else if(t>=65536&&t<=1114111)r=55296+((n=t-65536)>>10),n=56320+(1023&n),i.push(255&r),i.push(r>>8&255),i.push(255&n),i.push(n>>8&255);else throw RangeError(`utf16le.encode: UTF16LE value out of range: char[${s}]: ${t}`);return s.from(i)},decode(e,t){let r,s,n,i,o,a;if(e.length%2>0)throw RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${e.length}`);let l=[],h=e.length,u=t?2:0,c=0;for(;u57343){r=o,s=2;break}if((i=u+3)=56320&&a<=57343)){r=65536+(o-55296<<10)+(a-56320),s=4;break}}throw RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${u}]`)}l[c++]=r,u+=s}return l}},t.utf32be={encode(e){let t=s.alloc(4*e.length),r=0;return e.forEach(e=>{if(e>=55296&&e<=57343||e>1114111)throw RangeError(`utf32be.encode: UTF32BE character code out of range: char[${r/4}]: ${e}`);t[r++]=e>>24&255,t[r++]=e>>16&255,t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e,t){if(e.length%4>0)throw RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${e.length}`);let r=[],s=t?4:0;for(;s=55296&&t<=57343||t>1114111)throw RangeError(`utf32be.decode: UTF32BE character code out of range: char[${s/4}]: ${t}`);r.push(t)}return r}},t.utf32le={encode(e){let t=s.alloc(4*e.length),r=0;return e.forEach(e=>{if(e>=55296&&e<=57343||e>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${e}`);t[r++]=255&e,t[r++]=e>>8&255,t[r++]=e>>16&255,t[r++]=e>>24&255}),t},decode(e,t){if(e.length%4>0)throw RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${e.length}`);let r=[],s=t?4:0;for(;s=55296&&t<=57343||t>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${s/4}]: ${t}`);r.push(t)}return r}},t.uint7={encode(e){let t=s.alloc(e.length);for(let r=0;r127)throw RangeError(`uint7.encode: UINT7 character code out of range: char[${r}]: ${e[r]}`);t[r]=e[r]}return t},decode(e){let t=[];for(let r=0;r127)throw RangeError(`uint7.decode: UINT7 character code out of range: byte[${r}]: ${e[r]}`);t[r]=e[r]}return t}},t.uint8={encode(e){let t=s.alloc(e.length);for(let r=0;r255)throw RangeError(`uint8.encode: UINT8 character code out of range: char[${r}]: ${e[r]}`);t[r]=e[r]}return t},decode(e){let t=[];for(let r=0;r{if(e>65535)throw RangeError(`uint16be.encode: UINT16BE character code out of range: char[${r/2}]: ${e}`);t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e){if(e.length%2>0)throw RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${e.length}`);let t=[];for(let r=0;r{if(e>65535)throw RangeError(`uint16le.encode: UINT16LE character code out of range: char[${r/2}]: ${e}`);t[r++]=255&e,t[r++]=e>>8&255}),t},decode(e){if(e.length%2>0)throw RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${e.length}`);let t=[];for(let r=0;r{t[r++]=e>>24&255,t[r++]=e>>16&255,t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e){if(e.length%4>0)throw RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${e.length}`);let t=[];for(let r=0;r{t[r++]=255&e,t[r++]=e>>8&255,t[r++]=e>>16&255,t[r++]=e>>24&255}),t},decode(e){if(e.length%4>0)throw RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${e.length}`);let t=[];for(let r=0;rt.utf16le.encode(e).toString("utf16le"),decode:e=>t.utf16le.decode(s.from(e,"utf16le"),0)},t.escaped={encode(e){let t=[];for(let r=0;r=32&&i<=126)t.push(i);else{let e="";if(i>=0&&i<=31)e+=`\`x${n[i]}`;else if(i>=127&&i<=255)e+=`\`x${n[i]}`;else if(i>=256&&i<=65535)e+=`\`u${n[i>>8&255]}${n[255&i]}`;else if(i>=65536&&i<=4294967295){e+="`u{";let t=i>>24&255;t>0&&(e+=n[t]),e+=`${n[i>>16&255]+n[i>>8&255]+n[255&i]}}`}else throw Error("escape.encode(char): char > 0xffffffff not allowed");s.from(e).forEach(e=>{t.push(e)})}}return s.from(t)},decode(e){let t,r,s;function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}let i=[],o=e.length,a=0;for(;a=o)break;if(96===e[t]){i.push(96),a+=2,s=!1;break}if(120===e[t]){if((r=function(e,t,r){let s={char:null,nexti:e+2,error:!0};if(e+10&&10!==t[t.length-1]&&(t.push(13),t.push(10)),t},lf(e){let t=[],r=0;for(;r0&&10!==t[t.length-1]&&t.push(10),t}},t.base64={encode(e){let t,r,n;if(0===e.length)return s.alloc(0);let o=e.length%3;o=o>0?3-o:0;let a=(e.length+o)/3,l=s.alloc(4*a);o>0&&(a-=1),t=0,r=0;for(let s=0;s>18&63],l[r++]=i[n>>12&63],l[r++]=i[n>>6&63],l[r++]=i[63&n];return 0===o?l:1===o?(n=(e[t++]<<16)+(e[t]<<8),l[r++]=i[n>>18&63],l[r++]=i[n>>12&63],l[r++]=i[n>>6&63],l[r]=i[64],l):2===o?(n=e[t]<<16,l[r++]=i[n>>18&63],l[r++]=i[n>>12&63],l[r++]=i[64],l[r]=i[64],l):void 0},decode(e){let t,r,n;if(0===e.length)return s.alloc(0);let i=function(e){let t=[],r=0;for(let s=0;s=65&&n<=90){t.push(n-65);break}if(n>=97&&n<=122){t.push(n-71);break}if(n>=48&&n<=57){t.push(n+4);break}if(43===n){t.push(62);break}if(47===n){t.push(63);break}if(61===n){t.push(64),r+=1;break}throw RangeError(`base64.decode: invalid character buf[${s}]: ${n}`)}}if(t.length%4>0)throw RangeError(`base64.decode: string length not integral multiple of 4: ${t.length}`);switch(r){case 0:break;case 1:if(64!==t[t.length-1])throw RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==t[t.length-1]||64!==t[t.length-2])throw RangeError("base64.decode: two tail characters found: not last characters");break;default:throw RangeError(`base64.decode: more than two tail characters found: ${r}`)}return{tail:r,buf:s.from(t)}}(e),{tail:o}=i,a=i.buf,l=a.length/4,h=s.alloc(3*l-o);o>0&&(l-=1),r=0,t=0;for(let e=0;e>16&255,h[r++]=n>>8&255,h[r++]=255&n;return 1===o&&(n=(a[t++]<<18)+(a[t++]<<12)+(a[t]<<6),h[r++]=n>>16&255,h[r]=n>>8&255),2===o&&(n=(a[t++]<<18)+(a[t++]<<12),h[r]=n>>16&255),h},toString(e){if(e.length%4>0)throw RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",r=0;for(let n=0;n=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||43===s||47===s||61===s))throw RangeError(`base64.toString: buf[${t}]: ${e[t]} : not valid base64 character code`)}!function(e,s,n,i){switch(r){case 76:t+=`\r ${e}${s}${n}${i}`,r=4;break;case 75:t+=`${e}\r ${s}${n}${i}`,r=3;break;case 74:t+=`${e+s}\r ${n}${i}`,r=2;break;case 73:t+=`${e+s+n}\r ${i}`,r=1;break;default:t+=e+s+n+i,r+=4}}(String.fromCharCode(e[n]),String.fromCharCode(e[n+1]),String.fromCharCode(e[n+2]),String.fromCharCode(e[n+3]))}return t}}},87992:function(e,t,r){e.exports=function(){let e=r(74398),t=r(94813),s=this,n=null,i=null,o=null,a=0,l=[],h=[],u=[],c=[];function d(e){let t="";for(let r=0;r0?u.length=c[e-1].stack:u.length=0},this.getLength=function(){return c.length},this.toXml=function(r){let s=t.charsToDec,n="decimal integer character codes";if("string"==typeof r&&r.length>=3){let e=r.slice(0,3).toLowerCase();"asc"===e?(s=t.charsToAscii,n="ASCII for printing characters, hex for non-printing"):"hex"===e?(s=t.charsToHex,n="hexadecimal integer character codes"):"uni"===e&&(s=t.charsToUnicode,n="Unicode UTF-32 integer character codes")}let i="",a=0;return i+=` `+d(a+2)+s(o)+"\n",c.forEach(t=>{t.state===e.SEM_PRE?(a+=1,i+=d(a)+` `+d(a+2)+s(o,t.phraseIndex,t.phraseLength)+"\n"):(i+=d(a)+` `,a-=1)}),i+="\n"},this.phrases=function(){let t,r;let s={};for(t=0;t 0");t=Math.ceil(r),e=-1},this.increment=function(){return((e+=1)+t)%t},this.maxSize=function(){return t},this.items=function(){return e+1},this.getListIndex=function(r){return -1===e||r<0||r>e||e-r>=t?-1:(r+t)%t},this.forEach=function(r){if(-1!==e){if(e=y.length)throw Error(`${i}rule index: ${t} out of range`);if(r>=n)throw Error(`${i}phrase index: ${r} out of range`);let{length:a}=u;u.push({type:o.RNM,index:t}),e(a,r,s),u.pop()},w=function(t,r,s){let i=`${l}evaluateUdt(): `;if(t>=b.length)throw Error(`${i}udt index: ${t} out of range`);if(r>=n)throw Error(`${i}phrase index: ${r} out of range`);let{length:a}=u;u.push({type:o.UDT,empty:b[t].empty,index:t}),e(a,r,s),u.pop()},S=function(){d=0,p=0,f=0,v=0,i=[{lookAround:o.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],y=null,b=null,c=null,t=0,s=0,n=0,m=null,g=null,x=null,u=null},k=function(){let e=[],t=function(){let t=e[e.length-1],r={};for(let e in t)r[e]=t[e];return r};this.push=function(){e.push(t())},this.pop=function(t){let r=t;if(r||(r=e.length-1),r<1||r>e.length)throw Error(`${l}backRef.pop(): bad length: ${r}`);return e.length=r,e[e.length-1]},this.length=function(){return e.length},this.savePhrase=function(t,r,s){e[e.length-1][t]={phraseIndex:r,phraseLength:s}},this.getPhrase=function(t){return e[e.length-1][t]},function(){let t={};y.forEach(e=>{e.isBkr&&(t[e.lower]=null)}),b.length>0&&b.forEach(e=>{e.isBkr&&(t[e.lower]=null)}),e.push(t)}()},C=function(){let e=this;this.state=o.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=i[i.length-1],this.uFrame=new k,this.pFrame=new k,this.evaluateRule=A,this.evaluateUdt=w,this.refresh=function(){e.state=o.ACTIVE,e.phraseLength=0,e.lookAround=i[i.length-1]}},M=function(){return i[i.length-1]},O=function(){return i.length>1},L=function(){let e=`${l}initializeAst(): `;for(;;){if(void 0===h.ast){h.ast=null;break}if(null===h.ast)break;if("astObject"!==h.ast.astObject)throw Error(`${e}ast object not recognized`);break}null!==h.ast&&h.ast.init(y,b,c)},P=function(){let e=`${l}initializeTrace(): `;for(;;){if(void 0===h.trace){h.trace=null;break}if(null===h.trace)break;if("traceObject"!==h.trace.traceObject)throw Error(`${e}trace object not recognized`);break}null!==h.trace&&h.trace.init(y,b,c)},$=function(){let e=`${l}initializeStats(): `;for(;;){if(void 0===h.stats){h.stats=null;break}if(null===h.stats)break;if("statsObject"!==h.stats.statsObject)throw Error(`${e}stats object not recognized`);break}null!==h.stats&&h.stats.init(y,b)},R=function(e){let t=`${l}initializeGrammar(): `;if(!e)throw Error(`${t}grammar object undefined`);if("grammarObject"!==e.grammarObject)throw Error(`${t}bad grammar object`);y=e.rules,b=e.udts},B=function(e){let t=`${l}initializeStartRule(): `,r=null;if("number"==typeof e){if(e>=y.length)throw Error(`${t}start rule index too large: max: ${y.length}: index: ${e}`);r=e}else if("string"==typeof e){let s=e.toLowerCase();for(let e=0;e0&&"number"!=typeof h[0])throw Error(`${o}input string not an array of integers`);if("number"!=typeof u)u=0;else if((u=Math.floor(u))<0||u>h.length)throw Error(`${o}input beginning index out of range: ${u}`);if("number"!=typeof d)d=h.length-u;else if((d=Math.floor(d))<0||d>h.length-u)throw Error(`${o}input length out of range: ${d}`);c=h,n=(t=u)+(s=d)},D=function(){let e,t;let r=`${l}initializeCallbacks(): `;for(e=0,m=[],g=[];e 0: ${e}`)},this.setMaxNodeHits=function(e){if("number"!=typeof e||(E=Math.floor(e))<=0)throw Error(`parser: max node hits must be integer > 0: ${e}`)};let I=function(r,i,a){let h;let d=`${l}parse(): `;R(r);let m=B(i);D(),P(),$(),L();let g=new C;switch(null!=a&&(x=a),u=[{type:o.RNM,index:m}],e(0,t,g),u=null,g.state){case o.ACTIVE:throw Error(`${d}final state should never be 'ACTIVE'`);case o.NOMATCH:h=!1;break;case o.EMPTY:case o.MATCH:h=g.phraseLength===s;break;default:throw Error("unrecognized state")}return{success:h,state:g.state,length:s,matched:g.phraseLength,maxMatched:v,maxTreeDepth:p,nodeHits:f,inputLength:c.length,subBegin:t,subEnd:n,subLength:s}};this.parseSubstring=function(e,t,r,s,n,i){return S(),N(r,s,n),I(e,t,i)},this.parse=function(e,t,r,s){return S(),N(r,0,r.length),I(e,t,s)};let _=function(t,r,s){let n=u[t];for(let t=0;t=n)&&(e(t+1,a,s),s.state!==o.NOMATCH&&s.state!==o.EMPTY&&(c+=1,l+=s.phraseLength,a+=s.phraseLength,c!==d.max)););s.state===o.EMPTY?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):c>=d.min?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(p),s.pFrame.pop(f),h.ast&&h.ast.setLength(i))},H=function(e,t,r,s){if(t.phraseLength>r){let s=`${l}opRNM(${e.name}): callback function error: `;throw Error(s+=`sysData.phraseLength: ${t.phraseLength} must be <= remaining chars: ${r}`)}switch(t.state){case o.ACTIVE:if(!0!==s)throw Error(`${l}opRNM(${e.name}): callback function return error. ACTIVE state not allowed.`);break;case o.EMPTY:t.phraseLength=0;break;case o.MATCH:0===t.phraseLength&&(t.state=o.EMPTY);break;case o.NOMATCH:t.phraseLength=0;break;default:throw Error(`${l}opRNM(${e.name}): callback function return error. Unrecognized return state: ${t.state}`)}},U=function(t,r,s){let i,a,l,d,p,f;let g=u[t],b=y[g.index],v=m[b.index],T=!O();if(T&&((a=h.ast&&h.ast.ruleDefined(g.index))&&(i=h.ast.getLength(),h.ast.down(g.index,y[g.index].name)),d=s.uFrame.length(),p=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),f=s.pFrame,s.pFrame=new k),null===v)l=u,u=b.opcodes,e(0,r,s),u=l;else{let t=n-r;s.ruleIndex=b.index,v(s,c,r,x),H(b,s,t,!0),s.state===o.ACTIVE&&(l=u,u=b.opcodes,e(0,r,s),u=l,s.ruleIndex=b.index,v(s,c,r,x),H(b,s,t,!1))}T&&(a&&(s.state===o.NOMATCH?h.ast.setLength(i):h.ast.up(g.index,b.name,r,s.phraseLength)),s.pFrame=f,s.state===o.NOMATCH?(s.uFrame.pop(d),s.pFrame.pop(p)):b.isBkr&&(s.pFrame.savePhrase(b.lower,r,s.phraseLength),s.uFrame.savePhrase(b.lower,r,s.phraseLength)))},j=function(e,t,r){if(t.phraseLength>r){let s=`${l}opUDT(${e.name}): callback function error: `;throw Error(s+=`sysData.phraseLength: ${t.phraseLength} must be <= remaining chars: ${r}`)}switch(t.state){case o.ACTIVE:throw Error(`${l}opUDT(${e.name}): callback function return error. ACTIVE state not allowed.`);case o.EMPTY:if(!1===e.empty)throw Error(`${l}opUDT(${e.name}): callback function return error. May not return EMPTY.`);t.phraseLength=0;break;case o.MATCH:if(0===t.phraseLength){if(!1===e.empty)throw Error(`${l}opUDT(${e.name}): callback function return error. May not return EMPTY.`);t.state=o.EMPTY}break;case o.NOMATCH:t.phraseLength=0;break;default:throw Error(`${l}opUDT(${e.name}): callback function return error. Unrecognized return state: ${t.state}`)}},K=function(e,t,r){let s,i,a,l,d,p;let f=u[e],m=b[f.index];r.UdtIndex=m.index;let v=!O();v&&((a=h.ast&&h.ast.udtDefined(f.index))&&(i=y.length+f.index,s=h.ast.getLength(),h.ast.down(i,m.name)),l=r.uFrame.length(),d=r.pFrame.length(),r.uFrame.push(),r.pFrame.push(),p=r.pFrame,r.pFrame=new k);let T=n-t;g[f.index](r,c,t,x),j(m,r,T),v&&(a&&(r.state===o.NOMATCH?h.ast.setLength(s):h.ast.up(i,m.name,t,r.phraseLength)),r.pFrame=p,r.state===o.NOMATCH?(r.uFrame.pop(l),r.pFrame.pop(d)):m.isBkr&&(r.pFrame.savePhrase(m.lower,t,r.phraseLength),r.uFrame.savePhrase(m.lower,t,r.phraseLength)))},G=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=c.length,s=c.length-t,e(r+1,a,l);let h=i.pop();switch(n=h.charsEnd,s=h.charsLength,l.phraseLength=0,l.state){case o.EMPTY:case o.MATCH:l.state=o.EMPTY;break;case o.NOMATCH:l.state=o.NOMATCH;break;default:throw Error(`opAND: invalid state ${l.state}`)}},z=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=c.length,s=c.length-t,e(r+1,a,l);let h=i.pop();switch(n=h.charsEnd,s=h.charsLength,l.phraseLength=0,l.state){case o.EMPTY:case o.MATCH:l.state=o.NOMATCH;break;case o.NOMATCH:l.state=o.EMPTY;break;default:throw Error(`opNOT: invalid state ${l.state}`)}},Y=function(e,t,r){let s=u[e];r.state=o.NOMATCH,t=65&&i<=90&&(i+=32),i!==a.string[s])return;r.state=o.MATCH,r.phraseLength=l}},X=function(e,t,r){r.state=o.NOMATCH,r.phraseLength=0,r.state=0===t?o.EMPTY:o.NOMATCH},Z=function(e,t,r){r.state=o.NOMATCH,r.phraseLength=0,r.state=t===c.length?o.EMPTY:o.NOMATCH},J=function(e,t,r){let s,i,a,l;let h=u[e];r.state=o.NOMATCH,l=h.index=65&&i<=90&&(i+=32),a>=65&&a<=90&&(a+=32),i!==a)return;r.state=o.MATCH,r.phraseLength=m}else for(s=0;s=0;t-=1)if(e(c.children[t],a,s),a-=s.phraseLength,l+=s.phraseLength,s.state===o.NOMATCH){n=!1;break}n?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(d),s.pFrame.pop(p),h.ast&&h.ast.setLength(i))},er=function(t,r,s){let n,i,a,l;let c=u[t];i=r,a=0,l=0;let d=s.uFrame.length(),p=s.pFrame.length();for(h.ast&&(n=h.ast.getLength());!(i<=0)&&(e(t+1,i,s),s.state!==o.NOMATCH&&s.state!==o.EMPTY&&(l+=1,a+=s.phraseLength,i-=s.phraseLength,l!==c.max)););s.state===o.EMPTY?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):l>=c.min?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(d),s.pFrame.pop(p),h.ast&&h.ast.setLength(n))},es=function(e,t,r){let s=u[e];if(r.state=o.NOMATCH,r.phraseLength=0,t>0){let e=c[t-1];s.min<=e&&e<=s.max&&(r.state=o.MATCH,r.phraseLength=1)}},en=function(e,t,r){let s;let n=u[e];r.state=o.NOMATCH;let i=n.string.length,a=t-i;if(a>=0){for(s=0;s=0){for(let e=0;e=65&&s<=90&&(s+=32),s!==n.string[e])return;r.state=o.MATCH,r.phraseLength=i}},eo=function(e,t,r){let s,n,i,a;let l=u[e];r.state=o.NOMATCH,r.phraseLength=0,a=l.index=0){if(d){for(s=0;s=65&&n<=90&&(n+=32),i>=65&&i<=90&&(i+=32),n!==i)return;r.state=o.MATCH,r.phraseLength=f}else for(s=0;sE)throw Error(`parser: maximum number of node hits exceeded: ${E}`);if((d+=1)>p&&(p=d)>T)throw Error(`parser: maximum parse tree depth exceeded: ${T}`);if(r.refresh(),null!==h.trace){let e=M();h.trace.down(n,r.state,t,r.phraseLength,e.anchor,e.lookAround)}if(i[i.length-1].lookAround===o.LOOKAROUND_BEHIND)switch(n.type){case o.ALT:_(e,t,r);break;case o.CAT:et(e,t,r);break;case o.REP:er(e,t,r);break;case o.RNM:U(e,t,r);break;case o.UDT:K(e,t,r);break;case o.AND:G(e,t,r);break;case o.NOT:z(e,t,r);break;case o.TRG:es(e,t,r);break;case o.TBS:en(e,t,r);break;case o.TLS:ei(e,t,r);break;case o.BKR:eo(e,t,r);break;case o.BKA:Q(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:X(e,t,r);break;case o.AEN:Z(e,t,r);break;default:s=!1}else switch(n.type){case o.ALT:_(e,t,r);break;case o.CAT:F(e,t,r);break;case o.REP:V(e,t,r);break;case o.RNM:U(e,t,r);break;case o.UDT:K(e,t,r);break;case o.AND:G(e,t,r);break;case o.NOT:z(e,t,r);break;case o.TRG:Y(e,t,r);break;case o.TBS:W(e,t,r);break;case o.TLS:q(e,t,r);break;case o.BKR:J(e,t,r);break;case o.BKA:Q(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:X(e,t,r);break;case o.AEN:Z(e,t,r);break;default:s=!1}if(!O()&&t+r.phraseLength>v&&(v=t+r.phraseLength),null!==h.stats&&h.stats.collect(n,r),null!==h.trace){let e=M();h.trace.up(n,r.state,t,r.phraseLength,e.anchor,e.lookAround)}return d-=1,s}}},84842:function(e,t,r){e.exports=function(){let e;let t=r(74398),s=r(94813),n=r(53515),i=[],o=[],a=[],l=[],h=[];this.statsObject="statsObject";let u=function(e,t){return e.lowert.lower?1:0},c=function(e,t){return e.totalt.total?-1:u(e,t)},d=function(e,t){return e.indext.index?1:0},p=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},f=function(){a.length=0,e=new p,a[t.ALT]=new p,a[t.CAT]=new p,a[t.REP]=new p,a[t.RNM]=new p,a[t.TRG]=new p,a[t.TBS]=new p,a[t.TLS]=new p,a[t.UDT]=new p,a[t.AND]=new p,a[t.NOT]=new p,a[t.BKR]=new p,a[t.BKA]=new p,a[t.BKN]=new p,a[t.ABG]=new p,a[t.AEN]=new p,l.length=0;for(let e=0;e0){h.length=0;for(let e=0;e${e}${t.empty}${t.match}${t.nomatch}${t.total} `},y=function(){return""+(g("ALT",a[t.ALT])+g("CAT",a[t.CAT])+g("REP",a[t.REP])+g("RNM",a[t.RNM])+g("TRG",a[t.TRG])+g("TBS",a[t.TBS])+g("TLS",a[t.TLS])+g("UDT",a[t.UDT])+g("AND",a[t.AND])+g("NOT",a[t.NOT])+g("BKR",a[t.BKR])+g("BKA",a[t.BKA])+g("BKN",a[t.BKN])+g("ABG",a[t.ABG])+g("AEN",a[t.AEN])+g("totals",e))},b=function(){let e="";e+="\nrules\n";for(let t=0;t0&&(e+=`${l[t].name}${l[t].empty}${l[t].match}${l[t].nomatch}${l[t].total} `);if(o.length>0){e+="\nudts\n";for(let t=0;t0&&(e+=`${h[t].name}${h[t].empty}${h[t].match}${h[t].nomatch}${h[t].total} `)}return e};this.validate=function(e){let t=!1;return"string"==typeof e&&"stats"===e&&(t=!0),t},this.init=function(e,t){i=e,o=t,f()},this.collect=function(r,s){m(e,s.state,s.phraseLength),m(a[r.type],s.state,s.phraseLength),r.type===t.RNM&&m(l[r.index],s.state,s.phraseLength),r.type===t.UDT&&m(h[r.index],s.state,s.phraseLength)},this.toHtml=function(e,t){let r="";for(r+=` `,"string"==typeof t&&(r+=` `),r+=` `;;){if(null==e||"ops"===e){r+=y();break}if("index"===e){l.sort(d),h.length>0&&h.sort(d),r+=y()+b();break}if("hits"===e){l.sort(c),h.length>0&&h.sort(d),r+=y()+b();break}"alpha"===e&&(l.sort(u),h.length>0&&h.sort(u),r+=y()+b());break}return r+"
${t}
ops EMPTY MATCH NOMATCH totals
\n"},this.toHtmlPage=function(e,t,r){return s.htmlToPage(this.toHtml(e,t),r)}}},53515:function(e){e.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},60275:function(e,t,r){e.exports=function(){let e=r(94813),t=r(53515),s=new(r(73066)),n=r(74398),i="trace.js: ",o=this,a=[],l=5e3,h=-1,u=0,c=0,d=[],p=null,f=null,m=null,g=[],y=[],b=``,x=``,v=`𝜺`,T=function(){let e=function(e){g[n.ALT]=e,g[n.CAT]=e,g[n.REP]=e,g[n.TLS]=e,g[n.TBS]=e,g[n.TRG]=e,g[n.AND]=e,g[n.NOT]=e,g[n.BKR]=e,g[n.BKA]=e,g[n.BKN]=e,g[n.ABG]=e,g[n.AEN]=e},t=0;for(let e in o.filter.operators)t+=1;if(0===t){e(!1);return}for(let t in o.filter.operators){let r=t.toUpperCase();if(""===r){e(!0);return}if(""===r){e(!1);return}}for(let t in e(!1),o.filter.operators){let e=t.toUpperCase();if("ALT"===e)g[n.ALT]=!0===o.filter.operators[t];else if("CAT"===e)g[n.CAT]=!0===o.filter.operators[t];else if("REP"===e)g[n.REP]=!0===o.filter.operators[t];else if("AND"===e)g[n.AND]=!0===o.filter.operators[t];else if("NOT"===e)g[n.NOT]=!0===o.filter.operators[t];else if("TLS"===e)g[n.TLS]=!0===o.filter.operators[t];else if("TBS"===e)g[n.TBS]=!0===o.filter.operators[t];else if("TRG"===e)g[n.TRG]=!0===o.filter.operators[t];else if("BKR"===e)g[n.BKR]=!0===o.filter.operators[t];else if("BKA"===e)g[n.BKA]=!0===o.filter.operators[t];else if("BKN"===e)g[n.BKN]=!0===o.filter.operators[t];else if("ABG"===e)g[n.ABG]=!0===o.filter.operators[t];else if("AEN"===e)g[n.AEN]=!0===o.filter.operators[t];else throw Error(`${i}initOpratorFilter: '${t}' not a valid operator name. Must be , , alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`)}},E=function(){let e,t;let r=function(e){g[n.RNM]=e,g[n.UDT]=e;let t=f.length+m.length;y.length=0;for(let r=0;r"===t){r(!0);return}if(""===t){r(!1);return}}for(let e in r(!1),g[n.RNM]=!0,g[n.UDT]=!0,o.filter.rules){let r=e.toLowerCase();if((t=s.indexOf(r))<0)throw Error(`${i}initRuleFilter: '${e}' not a valid rule or udt name`);y[t]=!0===o.filter.rules[e]}};this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(e,t){if(h=-1,"number"==typeof e&&e>0)l=Math.ceil(e);else{l=0;return}"number"==typeof t&&(h=Math.floor(t))<0&&(h=-1)},this.getMaxRecords=function(){return l},this.getLastRecord=function(){return h},this.init=function(e,t,r){a.length=0,d.length=0,u=0,c=0,p=r,f=e,m=t,T(),E(),s.init(l)};let A=function(e){return e.type===n.RNM?!!g[e.type]&&!!y[e.index]:e.type===n.UDT?!!g[e.type]&&!!y[f.length+e.index]:g[e.type]},w=function(e){return -1===h||e<=h};this.down=function(e,t,r,n,i,o){w(u)&&A(e)&&(d.push(u),a[s.increment()]={dirUp:!1,depth:c,thisLine:u,thatLine:void 0,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},u+=1,c+=1)},this.up=function(e,t,r,n,i,o){if(w(u)&&A(e)){let l=u,h=d.pop(),p=s.getListIndex(h);-1!==p&&(a[p].thatLine=l),c-=1,a[s.increment()]={dirUp:!0,depth:c,thisLine:l,thatLine:h,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},u+=1}};let S=function(){let t,r,i,o,l;function h(t,r){let s,i,o;if(r)switch(t.op={id:r.type,name:e.opcodeToString(r.type)},t.opData=void 0,r.type){case n.RNM:t.opData=f[r.index].name;break;case n.UDT:t.opData=m[r.index].name;break;case n.BKR:s=r.index{if(o=a[e],E&&(E=!1,o.depth>0)){let e=o.dirUp?o.depth+1:o.depth;for(let t=0;t1;)y(r=T.pop(),null);if(0===A.children.length)throw Error("trace.toTree(): parse tree has no nodes");if(0===T.length)throw Error("trace.toTree(): integrity check: dummy root node disappeared?");let w=t=A.children[0];for(;t&&!t.down&&!t.up;)w=t,t=t.children[0];(t=w).leftMost=!0,t.rightMost=!0,function e(t){if(x+=1,t.branch=v,x>c&&(c=x),0===t.children.length)b+=1;else for(let r=0;r0&&(v+=1),t.children[r].leftMost=!1,t.children[r].rightMost=!1,t.leftMost&&(t.children[r].leftMost=0===r),t.rightMost&&(t.children[r].rightMost=r===t.children.length-1),e(t.children[r]);x-=1}(t),t.branch=0;let S={};S.string=[];for(let e=0;edisplay mode: ${s}

`,"string"==typeof r&&(n+=``),n};this.indent=function(e){let t="";for(let r=0;r0&&(r+="."),(s=t.string[e].toString(16).toUpperCase()).length%2!=0&&(s=`0${s}`),r+=s}}else{r="%d";for(let e=0;e0&&(r+="."),r+=t.string[e].toString(10)}s0&&(s+="."),(i=r.string[t])>=97&&i<=122?(e=i-32,s+=`${e.toString(o)}/${i.toString(o)}`.toUpperCase()):i>=65&&i<=90?(e=i,i+=32,s+=`${e.toString(o)}/${i.toString(o)}`.toUpperCase()):s+=i.toString(o).toUpperCase();n`,m=``,g="",y=!1;switch(s){case n.EMPTY:d+=v;case n.NOMATCH:case n.MATCH:case n.ACTIVE:h=a-(l=i-o),u=a,c=r.length-u;break;default:throw Error("unrecognized state")}return p=b,h>80?(h=80,p=x,c=0):h+c>80&&(p=x,c=80-h),h>0&&(d+=f+P(e,r,l,h,y)+g,y=!0),c>0&&(d+=m+P(e,r,u,c,y)+g),d+p},R=function(e,r,s,i,o,a){let l,h,u,c,d="",p=b,f=``,m="",g=!1;switch(s){case n.EMPTY:d+=v;case n.NOMATCH:case n.ACTIVE:l=i,h=0,u=i,c=r.length-u;break;case n.MATCH:l=i,u=i+(h=o),c=r.length-u;break;default:throw Error("unrecognized state")}return p=b,h>80?(h=80,p=x,c=0):h+c>80&&(p=x,c=80-h),h>0&&(d+=a+P(e,r,l,h,g)+m,g=!0),c>0&&(d+=f+P(e,r,u,c,g)+m),d+p},B=function(r){let i,l,h,u,c,d;if(null===f)return"";let g="";return g+="\n",s.forEach(s=>{let y=a[s];switch(i=y.thisLine,l=void 0!==y.thatLine?y.thatLine:"--",h=!1,u=!1,c=!1,y.lookAround===n.LOOKAROUND_AHEAD&&(h=!0,c=!0,d=y.lookAnchor),(y.opcode.type===n.AND||y.opcode.type===n.NOT)&&(h=!0,c=!0,d=y.phraseIndex),y.lookAround===n.LOOKAROUND_BEHIND&&(u=!0,c=!0,d=y.lookAnchor),(y.opcode.type===n.BKA||y.opcode.type===n.BKN)&&(u=!0,c=!0,d=y.phraseIndex),g+=`\n"}),g+="\n
${r}
(a)(b)(c)(d)(e)(f)operatorphrase
${i}${l}${y.phraseIndex}${y.phraseLength}${y.depth}`,y.state){case n.ACTIVE:g+=`↓ `;break;case n.MATCH:g+=`↑M`;break;case n.NOMATCH:g+=`↑N`;break;case n.EMPTY:g+=`↑E`;break;default:g+=`--`}if(g+=""+o.indent(y.depth),h?g+=``:u&&(g+=``),g+=e.opcodeToString(y.opcode.type),y.opcode.type===n.RNM&&(g+=`(${f[y.opcode.index].name}) `),y.opcode.type===n.BKR){let e=y.opcode.bkrCase===n.BKR_MODE_CI?"%i":"%s",t=y.opcode.bkrMode===n.BKR_MODE_UM?"%u":"%p";g+=`(\\${e}${t}${f[y.opcode.index].name}) `}(y.opcode.type===n.UDT&&(g+=`(${m[y.opcode.index].name}) `),y.opcode.type===n.TRG&&(g+=`(${C(r,y.opcode)}) `),y.opcode.type===n.TBS&&(g+=`(${O(r,y.opcode)}) `),y.opcode.type===n.TLS&&(g+=`(${L(r,y.opcode)}) `),y.opcode.type===n.REP&&(g+=`(${M(r,y.opcode)}) `),c&&(g+=""),g+="",u)?g+=$(r,p,y.state,y.phraseIndex,y.phraseLength,d):h?g+=R(r,p,y.state,y.phraseIndex,y.phraseLength,``):g+=R(r,p,y.state,y.phraseIndex,y.phraseLength,``),g+="
(a)(b)(c)(d)(e)(f)operatorphrase
\n"};this.toHtml=function(e,r){let s=8;if("string"==typeof e&&e.length>=3){let t=e.toLowerCase().slice(0,3);"hex"===t?s=16:"dec"===t?s=10:"uni"===t&&(s=32)}return k(s,r)+B(s)+""+`

legend:
(a) - line number
(b) - matching line number
(c) - phrase offset
(d) - phrase length
(e) - tree depth
(f) - operator state
    -   phrase opened
    - ↑M phrase matched
    - ↑E empty phrase matched
    - ↑N phrase not matched
operator - ALT, CAT, REP, RNM, TRG, TLS, TBS, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN
phrase   - up to 80 characters of the phrase being matched
         - matched characters
         - matched characters in look ahead mode
         - matched characters in look behind mode
         - remainder characters(not yet examined by parser)
         - control characters, TAB, LF, CR, etc. (ASCII mode only)
         - ${v} empty string
         - ${b} end of input string
         - ${x} input string display truncated

original ABNF operators:
ALT - alternation
CAT - concatenation
REP - repetition
RNM - rule name
TRG - terminal range
TLS - terminal literal string (case insensitive)
TBS - terminal binary string (case sensitive)

super set SABNF operators:
UDT - user-defined terminal
AND - positive look ahead
NOT - negative look ahead
BKA - positive look behind
BKN - negative look behind
BKR - back reference
ABG - anchor - begin of input string
AEN - anchor - end of input string

`}}},94813:function(e,t,r){let s=r(53515),n=r(95926),i=r(94981),o=r(74398),a="utilities.js: ",l=function(e,t,r){let s;let n=t;for(;;){if(e<=0){n=0,s=0;break}if("number"!=typeof n){n=0,s=e;break}if(n>=e){n=e,s=e;break}if("number"!=typeof r){s=e;break}(s=n+r)>e&&(s=e);break}return{beg:n,end:s}};t.htmlToPage=function(e,t){let r;if("string"!=typeof e)throw Error(`${a}htmlToPage: input HTML is not a string`);return r="string"!=typeof t?"htmlToPage":t,` ${r} \n\n\n"+`

${new Date}

`+e+"\n\n"},t.parserResultToHtml=function(e,t){let r,n,i=null;"string"==typeof t&&""!==t&&(i=t),r=!0===e.success?`true`:`false`,n=e.state===o.EMPTY?`EMPTY`:e.state===o.MATCH?`MATCH`:e.state===o.NOMATCH?`NOMATCH`:`unrecognized`;let a="";return a+=` `,i&&(a+=` `),a+=`
${i}
state itemvaluedescription
parser success${r} true if the parse succeeded, false otherwise
NOTE: for success, entire string must be matched
parser state${n} EMPTY, MATCH or NOMATCH
string length${e.length}length of the input (sub)string
matched length${e.matched}number of input string characters matched
max matched${e.maxMatched}maximum number of input string characters matched
max tree depth${e.maxTreeDepth}maximum depth of the parse tree reached
node hits${e.nodeHits}number of parse tree node hits (opcode function calls)
input length${e.inputLength}length of full input string
sub-string begin${e.subBegin}sub-string first character index
sub-string end${e.subEnd}sub-string end-of-string index
sub-string length${e.subLength}sub-string length
`},t.charsToString=function(e,t,r){let s,i;if("number"==typeof t){if(t>=e.length)return"";s=t<0?0:t}else s=0;if("number"==typeof r){if(r<=0)return"";i=r>e.length-s?e.length:s+r}else i=e.length;return sn.beg){s+=e[n.beg];for(let t=n.beg+1;ti.beg){n+=`\\x${t.charToHex(e[i.beg])}`;for(let r=i.beg+1;rn.beg)for(let t=n.beg;ti.beg)for(let r=i.beg;r=55296&&o<=57343||o>1114111?1:0)?n+=` U+${t.charToHex(e[r])}`:n+=`&#${e[r]};`}return n},t.charsToJsUnicode=function(e,r,s){let n="";if(!Array.isArray(e))throw Error(`${a}charsToJsUnicode: input must be an array of integers`);let i=l(e.length,r,s);if(i.end>i.beg){n+=`\\u${t.charToHex(e[i.beg])}`;for(let r=i.beg+1;r=32&&s<=126?n+=String.fromCharCode(s):n+=`\\x${t.charToHex(s)}`}return n},t.charsToAsciiHtml=function(e,r,n){let i;if(!Array.isArray(e))throw Error(`${a}charsToAsciiHtml: input must be an array of integers`);let o="",h=l(e.length,r,n);for(let r=h.beg;r${t.asciiChars[i]}`:i>127?o+=`U+${t.charToHex(i)}`:o+=t.asciiChars[i];return o},t.stringToAsciiHtml=function(e){let t=n.decode("STRING",e);return this.charsToAsciiHtml(t)}},10285:function(e,t,r){"use strict";r.r(t),r.d(t,{BaseContract:function(){return a.VZ},BigNumber:function(){return l.O$},Contract:function(){return a.CH},ContractFactory:function(){return a.lV},FixedNumber:function(){return h.xs},Signer:function(){return n.E},VoidSigner:function(){return n.b},Wallet:function(){return i.Wallet},Wordlist:function(){return m.D},constants:function(){return u},errors:function(){return c.ErrorCode},ethers:function(){return s},getDefaultProvider:function(){return o.getDefaultProvider},logger:function(){return s.logger},providers:function(){return o},utils:function(){return d},version:function(){return f.i},wordlists:function(){return p.E}});var s=r(33605),n=r(55741),i=r(47991),o=r(99698),a=r(42645),l=r(83196),h=r(4747),u=r(23633),c=r(6659),d=r(61052),p=r(98206),f=r(16878),m=r(68185);try{let e=window;null==e._ethers&&(e._ethers=s)}catch(e){}},48166:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});/** * @license lucide-react v0.447.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let s=(0,r(79205).Z)("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]])},48667:function(e,t,r){"use strict";r.d(t,{default:function(){return n.a}});var s=r(88003),n=r.n(s)},36539:function(e,t,r){"use strict";var s=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,h=(e,t)=>n(e,"name",{value:t,configurable:!0}),u=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))l.call(e,a)||a===r||n(e,a,{get:()=>t[a],enumerable:!(s=i(t,a))||s.enumerable});return e},c=(e,t,r)=>(r=null!=e?s(a(e)):{},u(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),d={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(d,{default:()=>y}),e.exports=u(n({},"__esModule",{value:!0}),d);var p=c(r(40718)),f=c(r(2265)),m=c(r(71318)),g=h(e=>{let{color:t,height:r,showSpinner:s,crawl:n,crawlSpeed:i,initialPosition:o,easing:a,speed:l,shadow:u,template:c,zIndex:d=1600,showAtBottom:p=!1}=e,g=null!=t?t:"#29d",y=u||void 0===u?u?"box-shadow:".concat(u):"box-shadow:0 0 10px ".concat(g,",0 0 5px ").concat(g):"",b=f.createElement("style",null,"#nprogress{pointer-events:none}#nprogress .bar{background:".concat(g,";position:fixed;z-index:").concat(d,";").concat(p?"bottom: 0;":"top: 0;","left:0;width:100%;height:").concat(null!=r?r:3,"px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;").concat(y,";opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:").concat(d,";").concat(p?"bottom: 15px;":"top: 15px;","right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:").concat(g,";border-left-color:").concat(g,";border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}")),x=h(e=>new URL(e,window.location.href).href,"toAbsoluteURL"),v=h((e,t)=>{let r=new URL(x(e)),s=new URL(x(t));return r.href.split("#")[0]===s.href.split("#")[0]},"isHashAnchor"),T=h((e,t)=>{let r=new URL(x(e)),s=new URL(x(t));return r.hostname.replace(/^www\./,"")===s.hostname.replace(/^www\./,"")},"isSameHostName");return f.useEffect(()=>{let e,t;function r(e,t){let r=new URL(e),s=new URL(t);if(r.hostname===s.hostname&&r.pathname===s.pathname&&r.search===s.search){let e=r.hash,t=s.hash;return e!==t&&r.href.replace(e,"")===s.href.replace(t,"")}return!1}m.configure({showSpinner:null==s||s,trickle:null==n||n,trickleSpeed:null!=i?i:200,minimum:null!=o?o:.08,easing:null!=a?a:"ease",speed:null!=l?l:200,template:null!=c?c:'
'}),h(r,"isAnchorOfCurrentUrl");var u,d,p=document.querySelectorAll("html");let f=h(()=>p.forEach(e=>e.classList.remove("nprogress-busy")),"removeNProgressClass");function g(e){for(;e&&"a"!==e.tagName.toLowerCase();)e=e.parentElement;return e}function y(e){try{let t=e.target,s=g(t),n=null==s?void 0:s.href;if(n){let t=window.location.href,i="_blank"===s.target,o=["tel:","mailto:","sms:","blob:","download:"].some(e=>n.startsWith(e)),a=r(t,n);if(!T(window.location.href,s.href))return;n===t||a||i||o||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||v(window.location.href,s.href)||!x(s.href).startsWith("http")?(m.start(),m.done(),f()):m.start()}}catch(e){m.start(),m.done()}}function b(){m.done(),f()}function E(){m.done()}return h(g,"findClosestAnchor"),h(y,"handleClick"),e=(u=window.history).pushState,u.pushState=function(){for(var t=arguments.length,r=Array(t),s=0;s{document.removeEventListener("click",y),window.removeEventListener("pagehide",b),window.removeEventListener("popstate",E)}},[]),b},"NextTopLoader"),y=g;g.propTypes={color:p.string,height:p.number,showSpinner:p.bool,crawl:p.bool,crawlSpeed:p.number,initialPosition:p.number,easing:p.string,speed:p.number,template:p.string,shadow:p.oneOfType([p.string,p.bool]),zIndex:p.number,showAtBottom:p.bool}},71318:function(e,t,r){var s,n;void 0!==(n="function"==typeof(s=function(){var e,t,r,s={};s.version="0.2.0";var n=s.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function i(e,t,r){return er?r:e}s.configure=function(e){var t,r;for(t in e)void 0!==(r=e[t])&&e.hasOwnProperty(t)&&(n[t]=r);return this},s.status=null,s.set=function(e){var t=s.isStarted();e=i(e,n.minimum,1),s.status=1===e?null:e;var r=s.render(!t),l=r.querySelector(n.barSelector),h=n.speed,u=n.easing;return r.offsetWidth,o(function(t){var i,o;""===n.positionUsing&&(n.positionUsing=s.getPositioningCSS()),a(l,(i=e,(o="translate3d"===n.positionUsing?{transform:"translate3d("+(-1+i)*100+"%,0,0)"}:"translate"===n.positionUsing?{transform:"translate("+(-1+i)*100+"%,0)"}:{"margin-left":(-1+i)*100+"%"}).transition="all "+h+"ms "+u,o)),1===e?(a(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){a(r,{transition:"all "+h+"ms linear",opacity:0}),setTimeout(function(){s.remove(),t()},h)},h)):setTimeout(t,h)}),this},s.isStarted=function(){return"number"==typeof s.status},s.start=function(){s.status||s.set(0);var e=function(){setTimeout(function(){s.status&&(s.trickle(),e())},n.trickleSpeed)};return n.trickle&&e(),this},s.done=function(e){return e||s.status?s.inc(.3+.5*Math.random()).set(1):this},s.inc=function(e){var t=s.status;return t?("number"!=typeof e&&(e=(1-t)*i(Math.random()*t,.1,.95)),t=i(t+e,0,.994),s.set(t)):s.start()},s.trickle=function(){return s.inc(Math.random()*n.trickleRate)},e=0,t=0,s.promise=function(r){return r&&"resolved"!==r.state()&&(0===t&&s.start(),e++,t++,r.always(function(){0==--t?(e=0,s.done()):s.set((e-t)/e)})),this},s.render=function(e){if(s.isRendered())return document.getElementById("nprogress");h(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=n.template;var r,i=t.querySelector(n.barSelector),o=e?"-100":(-1+(s.status||0))*100,l=document.querySelector(n.parent);return a(i,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),!n.showSpinner&&(r=t.querySelector(n.spinnerSelector))&&d(r),l!=document.body&&h(l,"nprogress-custom-parent"),l.appendChild(t),t},s.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(n.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},s.isRendered=function(){return!!document.getElementById("nprogress")},s.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective" in e?"translate3d":t+"Transform" in e?"translate":"margin"};var o=(r=[],function(e){r.push(e),1==r.length&&function e(){var t=r.shift();t&&t(e)}()}),a=function(){var e=["Webkit","O","Moz","ms"],t={};function r(r,s,n){var i;s=t[i=(i=s).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[i]=function(t){var r=document.body.style;if(t in r)return t;for(var s,n=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);n--;)if((s=e[n]+i)in r)return s;return t}(i)),r.style[s]=n}return function(e,t){var s,n,i=arguments;if(2==i.length)for(s in t)void 0!==(n=t[s])&&t.hasOwnProperty(s)&&r(e,s,n);else r(e,i[1],i[2])}}();function l(e,t){return("string"==typeof e?e:c(e)).indexOf(" "+t+" ")>=0}function h(e,t){var r=c(e),s=r+t;l(r,t)||(e.className=s.substring(1))}function u(e,t){var r,s=c(e);l(e,t)&&(r=s.replace(" "+t+" "," "),e.className=r.substring(1,r.length-1))}function c(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return s})?s.call(t,r,t,e):s)&&(e.exports=n)},7663:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&s(t,e,r);return n(t,e),t},o=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.SiweMessage=void 0;let a=r(70053),l=i(r(66075)),h=r(47582),u=r(1301),c=r(53809);class d{constructor(e){if("string"==typeof e){let t=new a.ParsedMessage(e);this.scheme=t.scheme,this.domain=t.domain,this.address=t.address,this.statement=t.statement,this.uri=t.uri,this.version=t.version,this.nonce=t.nonce,this.issuedAt=t.issuedAt,this.expirationTime=t.expirationTime,this.notBefore=t.notBefore,this.requestId=t.requestId,this.chainId=t.chainId,this.resources=t.resources}else this.scheme=null==e?void 0:e.scheme,this.domain=e.domain,this.address=e.address,this.statement=null==e?void 0:e.statement,this.uri=e.uri,this.version=e.version,this.chainId=e.chainId,this.nonce=e.nonce,this.issuedAt=null==e?void 0:e.issuedAt,this.expirationTime=null==e?void 0:e.expirationTime,this.notBefore=null==e?void 0:e.notBefore,this.requestId=null==e?void 0:e.requestId,this.resources=null==e?void 0:e.resources,"string"==typeof this.chainId&&(this.chainId=(0,a.parseIntegerNumber)(this.chainId));this.nonce=this.nonce||(0,c.generateNonce)(),this.validateMessage()}toMessage(){this.validateMessage();let e=this.scheme?`${this.scheme}://${this.domain}`:this.domain,t=`${e} wants you to sign in with your Ethereum account:`,r=`URI: ${this.uri}`,s=[t,this.address].join("\n"),n=`Version: ${this.version}`;this.nonce||(this.nonce=(0,c.generateNonce)());let i=[r,n,"Chain ID: "+this.chainId,`Nonce: ${this.nonce}`];if(this.issuedAt=this.issuedAt||new Date().toISOString(),i.push(`Issued At: ${this.issuedAt}`),this.expirationTime){let e=`Expiration Time: ${this.expirationTime}`;i.push(e)}this.notBefore&&i.push(`Not Before: ${this.notBefore}`),this.requestId&&i.push(`Request ID: ${this.requestId}`),this.resources&&i.push(["Resources:",...this.resources.map(e=>`- ${e}`)].join("\n"));let o=i.join("\n");return s=[s,this.statement].join("\n\n"),this.statement&&(s+="\n"),[s,o].join("\n")}prepareMessage(){let e;return this.version,this.toMessage()}validate(e,t){return o(this,void 0,void 0,function*(){return console.warn("validate() has been deprecated, please update your code to use verify(). validate() may be removed in future versions."),this.verify({signature:e},{provider:t,suppressExceptions:!1}).then(({data:e})=>e).catch(({error:e})=>{throw e})})}verify(e,t={suppressExceptions:!1}){return o(this,void 0,void 0,function*(){return new Promise((r,s)=>{var n,i,o;let a,l;let d=e=>t.suppressExceptions?r(e):s(e),p=(0,c.checkInvalidKeys)(e,u.VerifyParamsKeys);p.length>0&&d({success:!1,data:this,error:Error(`${p.join(", ")} is/are not valid key(s) for VerifyParams.`)});let f=(0,c.checkInvalidKeys)(t,u.VerifyOptsKeys);p.length>0&&d({success:!1,data:this,error:Error(`${f.join(", ")} is/are not valid key(s) for VerifyOpts.`)});let{signature:m,scheme:g,domain:y,nonce:b,time:x}=e;g&&g!==this.scheme&&d({success:!1,data:this,error:new u.SiweError(u.SiweErrorType.SCHEME_MISMATCH,g,this.scheme)}),y&&y!==this.domain&&d({success:!1,data:this,error:new u.SiweError(u.SiweErrorType.DOMAIN_MISMATCH,y,this.domain)}),b&&b!==this.nonce&&d({success:!1,data:this,error:new u.SiweError(u.SiweErrorType.NONCE_MISMATCH,b,this.nonce)});let v=new Date(x||new Date);if(this.expirationTime){let e=new Date(this.expirationTime);v.getTime()>=e.getTime()&&d({success:!1,data:this,error:new u.SiweError(u.SiweErrorType.EXPIRED_MESSAGE,`${v.toISOString()} < ${e.toISOString()}`,`${v.toISOString()} >= ${e.toISOString()}`)})}if(this.notBefore){let e=new Date(this.notBefore);v.getTime()= ${e.toISOString()}`,`${v.toISOString()} < ${e.toISOString()}`)})}try{a=this.prepareMessage()}catch(e){d({success:!1,data:this,error:e})}try{l=(0,h.verifyMessage)(a,m)}catch(e){console.error(e)}if(l===this.address)return r({success:!0,data:this});{let s=(0,c.checkContractWalletSignature)(this,m,t.provider).then(e=>e?{success:!0,data:this}:{success:!1,data:this,error:new u.SiweError(u.SiweErrorType.INVALID_SIGNATURE,l,`Resolved address to be ${this.address}`)}).catch(e=>({success:!1,data:this,error:e}));Promise.all([s,null===(o=null===(i=null===(n=null==t?void 0:t.verificationFallback)||void 0===n?void 0:n.call(t,e,t,this,s))||void 0===i?void 0:i.then(e=>e))||void 0===o?void 0:o.catch(e=>e)]).then(([e,t])=>{if(t){if(t.success)return r(t);d(t)}else{if(e.success)return r(e);d(e)}})}})})}validateMessage(...e){var t;if(e.length>0)throw new u.SiweError(u.SiweErrorType.UNABLE_TO_PARSE,"Unexpected argument in the validateMessage function.");if(!this.domain||0===this.domain.length||!/[^#?]*/.test(this.domain))throw new u.SiweError(u.SiweErrorType.INVALID_DOMAIN,`${this.domain} to be a valid domain.`);if(!(0,a.isEIP55Address)(this.address))throw new u.SiweError(u.SiweErrorType.INVALID_ADDRESS,(0,h.getAddress)(this.address),this.address);if(!l.isUri(this.uri))throw new u.SiweError(u.SiweErrorType.INVALID_URI,`${this.uri} to be a valid uri.`);if("1"!==this.version)throw new u.SiweError(u.SiweErrorType.INVALID_MESSAGE_VERSION,"1",this.version);let r=null===(t=this===null||void 0===this?void 0:this.nonce)||void 0===t?void 0:t.match(/[a-zA-Z0-9]{8,}/);if(!r||this.nonce.length<8||r[0]!==this.nonce)throw new u.SiweError(u.SiweErrorType.INVALID_NONCE,`Length > 8 (${r.length}). Alphanumeric.`,this.nonce);if(this.issuedAt&&!(0,c.isValidISO8601Date)(this.issuedAt)||this.expirationTime&&!(0,c.isValidISO8601Date)(this.expirationTime)||this.notBefore&&!(0,c.isValidISO8601Date)(this.notBefore))throw Error(u.SiweErrorType.INVALID_TIME_FORMAT)}}t.SiweMessage=d},47582:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=t.hashMessage=t.verifyMessage=void 0;let s=r(10285),n=null,i=null,o=null;try{n=s.ethers.utils.verifyMessage,i=s.ethers.utils.hashMessage,o=s.ethers.utils.getAddress}catch(e){n=s.ethers.verifyMessage,i=s.ethers.hashMessage,o=s.ethers.getAddress}t.verifyMessage=n,t.hashMessage=i,t.getAddress=o},34958:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7663),t),n(r(1301),t),n(r(53809),t)},1301:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SiweErrorType=t.SiweError=t.VerifyOptsKeys=t.VerifyParamsKeys=void 0,t.VerifyParamsKeys=["signature","scheme","domain","nonce","time"],t.VerifyOptsKeys=["provider","suppressExceptions","verificationFallback"];class s{constructor(e,t,r){this.type=e,this.expected=t,this.received=r}}t.SiweError=s,(r=t.SiweErrorType||(t.SiweErrorType={})).EXPIRED_MESSAGE="Expired message.",r.INVALID_DOMAIN="Invalid domain.",r.SCHEME_MISMATCH="Scheme does not match provided scheme for verification.",r.DOMAIN_MISMATCH="Domain does not match provided domain for verification.",r.NONCE_MISMATCH="Nonce does not match provided nonce for verification.",r.INVALID_ADDRESS="Invalid address.",r.INVALID_URI="URI does not conform to RFC 3986.",r.INVALID_NONCE="Nonce size smaller then 8 characters or is not alphanumeric.",r.NOT_YET_VALID_MESSAGE="Message is not valid yet.",r.INVALID_SIGNATURE="Signature does not match address of the message.",r.INVALID_TIME_FORMAT="Invalid time format.",r.INVALID_MESSAGE_VERSION="Invalid message version.",r.UNABLE_TO_PARSE="Unable to parse the message."},53809:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.checkInvalidKeys=t.isValidISO8601Date=t.generateNonce=t.checkContractWalletSignature=void 0;let n=r(78539),i=r(10285),o=r(47582),a=["function isValidSignature(bytes32 _message, bytes _signature) public view returns (bytes4)"],l=/^(?[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]))[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;t.checkContractWalletSignature=(e,t,r)=>s(void 0,void 0,void 0,function*(){if(!r)return!1;let s=new i.Contract(e.address,a,r),n=(0,o.hashMessage)(e.prepareMessage());return(yield s.isValidSignature(n,t))==="0x1626ba7e"}),t.generateNonce=()=>{let e=(0,n.randomStringForEntropy)(96);if(!e||e.length<8)throw Error("Error during nonce creation.");return e},t.isValidISO8601Date=e=>{let t=l.exec(e);if(!e)return!1;let r=new Date(t.groups.date).toISOString(),s=l.exec(r);return t.groups.date===s.groups.date},t.checkInvalidKeys=(e,t)=>{let r=[];return Object.keys(e).forEach(e=>{t.includes(e)||r.push(e)}),r}},66075:function(e,t,r){!function(e){"use strict";e.exports.is_uri=r,e.exports.is_http_uri=s,e.exports.is_https_uri=n,e.exports.is_web_uri=i,e.exports.isUri=r,e.exports.isHttpUri=s,e.exports.isHttpsUri=n,e.exports.isWebUri=i;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(!(!e||/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)||/%[^0-9a-f]/i.test(e)||/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e))){var r=[],s="",n="",i="",o="",a="",l="";if(s=(r=t(e))[1],n=r[2],i=r[3],o=r[4],a=r[5],s&&s.length&&i.length>=0){if(n&&n.length){if(!(0===i.length||/^\//.test(i)))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return l+=s+":",n&&n.length&&(l+="//"+n),l+=i,o&&o.length&&(l+="?"+o),a&&a.length&&(l+="#"+a),l}}}function s(e,s){if(r(e)){var n=[],i="",o="",a="",l="",h="",u="",c="";if(i=(n=t(e))[1],o=n[2],a=n[3],h=n[4],u=n[5],i){if(s){if("https"!=i.toLowerCase())return}else if("http"!=i.toLowerCase())return;if(!o)return;return/:(\d+)$/.test(o)&&(l=o.match(/:(\d+)$/)[0],o=o.replace(/:\d+$/,"")),c+=i+"://"+o,l&&(c+=l),c+=a,h&&h.length&&(c+="?"+h),u&&u.length&&(c+="#"+u),c}}}function n(e){return s(e,!0)}function i(e){return s(e)||n(e)}}(e=r.nmd(e))},14252:function(e){e.exports={style:{fontFamily:"'__Sora_2289ea', '__Sora_Fallback_2289ea'",fontStyle:"normal"},className:"__className_2289ea",variable:"__variable_2289ea"}},67908:function(e,t,r){"use strict";r.d(t,{$:function(){return a}});var s=r(11860),n="#1A1B1F",i={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:n},orange:{accentColor:"#FF983D",accentColorForeground:n},pink:{accentColor:"#FF7AB8",accentColorForeground:n},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},o=i.blue,a=function(){let{accentColor:e=o.accentColor,accentColorForeground:t=o.accentColorForeground,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...(0,s.w)(r),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:n,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}}};a.accentColors=i},48614:function(e,t,r){"use strict";r.d(t,{M:function(){return y}});var s=r(57437),n=r(2265),i=r(64252),o=r(53576),a=r(45750);class l extends n.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function h(e){let{children:t,isPresent:r}=e,i=(0,n.useId)(),o=(0,n.useRef)(null),h=(0,n.useRef)({width:0,height:0,top:0,left:0}),{nonce:u}=(0,n.useContext)(a._);return(0,n.useInsertionEffect)(()=>{let{width:e,height:t,top:s,left:n}=h.current;if(r||!o.current||!e||!t)return;o.current.dataset.motionPopId=i;let a=document.createElement("style");return u&&(a.nonce=u),document.head.appendChild(a),a.sheet&&a.sheet.insertRule('\n [data-motion-pop-id="'.concat(i,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n top: ").concat(s,"px !important;\n left: ").concat(n,"px !important;\n }\n ")),()=>{document.head.removeChild(a)}},[r]),(0,s.jsx)(l,{isPresent:r,childRef:o,sizeRef:h,children:n.cloneElement(t,{ref:o})})}let u=e=>{let{children:t,initial:r,isPresent:a,onExitComplete:l,custom:u,presenceAffectsLayout:d,mode:p}=e,f=(0,o.h)(c),m=(0,n.useId)(),g=(0,n.useMemo)(()=>({id:m,initial:r,isPresent:a,custom:u,onExitComplete:e=>{for(let t of(f.set(e,!0),f.values()))if(!t)return;l&&l()},register:e=>(f.set(e,!1),()=>f.delete(e))}),d?[Math.random()]:[a]);return(0,n.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[a]),n.useEffect(()=>{a||f.size||!l||l()},[a]),"popLayout"===p&&(t=(0,s.jsx)(h,{isPresent:a,children:t})),(0,s.jsx)(i.O.Provider,{value:g,children:t})};function c(){return new Map}var d=r(58881),p=r(13223);let f=e=>e.key||"";function m(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}var g=r(11534);let y=e=>{let{children:t,exitBeforeEnter:r,custom:i,initial:a=!0,onExitComplete:l,presenceAffectsLayout:h=!0,mode:c="sync"}=e;(0,p.k)(!r,"Replace exitBeforeEnter with mode='wait'");let y=(0,n.useMemo)(()=>m(t),[t]),b=y.map(f),x=(0,n.useRef)(!0),v=(0,n.useRef)(y),T=(0,o.h)(()=>new Map),[E,A]=(0,n.useState)(y),[w,S]=(0,n.useState)(y);(0,g.L)(()=>{x.current=!1,v.current=y;for(let e=0;e{let t=f(e),r=y===w||b.includes(t);return(0,s.jsx)(u,{isPresent:r,initial:(!x.current||!!a)&&void 0,custom:r?void 0:i,presenceAffectsLayout:h,mode:c,onExitComplete:r?void 0:()=>{if(!T.has(t))return;T.set(t,!0);let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(null==C||C(),S(v.current),l&&l())},children:e},t)})})}},58881:function(e,t,r){"use strict";r.d(t,{p:function(){return s}});let s=(0,r(2265).createContext)({})},45750:function(e,t,r){"use strict";r.d(t,{_:function(){return s}});let s=(0,r(2265).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},64252:function(e,t,r){"use strict";r.d(t,{O:function(){return s}});let s=(0,r(2265).createContext)(null)},74847:function(e,t,r){"use strict";let s;function n(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}r.d(t,{E:function(){return ih}});let i=e=>Array.isArray(e);function o(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let s=0;s{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function h(e,t,r,s){if("function"==typeof t){let[n,i]=l(s);t=t(void 0!==r?r:e.custom,n,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[n,i]=l(s);t=t(void 0!==r?r:e.custom,n,i)}return t}function u(e,t,r){let s=e.getProps();return h(s,t,void 0!==r?r:s.custom,e)}let c=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],d=["initial",...c],p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],f=new Set(p),m=e=>1e3*e,g=e=>e/1e3,y={type:"spring",stiffness:500,damping:25,restSpeed:10},b=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),x={type:"keyframes",duration:.8},v={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},T=(e,{keyframes:t})=>t.length>2?x:f.has(e)?e.startsWith("scale")?b(t[1]):y:v;function E(e,t){return e[t]||e.default||e}let A={skipAnimations:!1,useManualTiming:!1},w={current:!1},S=e=>null!==e;function k(e,{repeat:t,repeatType:r="loop"},s){let n=e.filter(S),i=t&&"loop"!==r&&t%2==1?0:n.length-1;return i&&void 0!==s?s:n[i]}var C,M,O,L=r(44439);let P=["read","resolveKeyframes","update","preRender","render","postRender"];function $(e,t){let r=!1,s=!0,n={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,o=P.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,s=!1,n=!1,i=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(l.schedule(t),e()),t(o)}let l={schedule:(e,n=!1,o=!1)=>{let a=o&&s?t:r;return n&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{if(o=e,s){n=!0;return}s=!0,[t,r]=[r,t],r.clear(),t.forEach(a),s=!1,n&&(n=!1,l.process(e))}};return l}(i),e),{}),{read:a,resolveKeyframes:l,update:h,preRender:u,render:c,postRender:d}=o,p=()=>{let i=A.useManualTiming?n.timestamp:performance.now();r=!1,n.delta=s?1e3/60:Math.max(Math.min(i-n.timestamp,40),1),n.timestamp=i,n.isProcessing=!0,a.process(n),l.process(n),h.process(n),u.process(n),c.process(n),d.process(n),n.isProcessing=!1,r&&t&&(s=!1,e(p))},f=()=>{r=!0,s=!0,n.isProcessing||e(p)};return{schedule:P.reduce((e,t)=>{let s=o[t];return e[t]=(e,t=!1,n=!1)=>(r||f(),s.schedule(e,t,n)),e},{}),cancel:e=>{for(let t=0;t(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function _(e,t,r,s){if(e===t&&r===s)return L.Z;let n=t=>(function(e,t,r,s,n){let i,o;let a=0;do(i=I(o=t+(r-t)/2,s,n)-e)>0?r=o:t=o;while(Math.abs(i)>1e-7&&++a<12);return o})(t,0,1,e,r);return e=>0===e||1===e?e:I(n(e),t,s)}let F=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,V=e=>t=>1-e(1-t),H=_(.33,1.53,.69,.99),U=V(H),j=F(U),K=e=>(e*=2)<1?.5*U(e):.5*(2-Math.pow(2,-10*(e-1))),G=e=>1-Math.sin(Math.acos(e)),z=V(G),Y=F(G),W=e=>/^0[^.\s]+$/u.test(e);var q=r(13223);let X=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Z=e=>t=>"string"==typeof t&&t.startsWith(e),J=Z("--"),Q=Z("var(--"),ee=e=>!!Q(e)&&et.test(e.split("/*")[0].trim()),et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,er=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,es=(e,t,r)=>r>t?t:r"number"==typeof e,parse:parseFloat,transform:e=>e},ei={...en,transform:e=>es(0,1,e)},eo={...en,default:1},ea=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),el=ea("deg"),eh=ea("%"),eu=ea("px"),ec=ea("vh"),ed=ea("vw"),ep={...eh,parse:e=>eh.parse(e)/100,transform:e=>eh.transform(100*e)},ef=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),em=e=>e===en||e===eu,eg=(e,t)=>parseFloat(e.split(", ")[t]),ey=(e,t)=>(r,{transform:s})=>{if("none"===s||!s)return 0;let n=s.match(/^matrix3d\((.+)\)$/u);if(n)return eg(n[1],t);{let t=s.match(/^matrix\((.+)\)$/u);return t?eg(t[1],e):0}},eb=new Set(["x","y","z"]),ex=p.filter(e=>!eb.has(e)),ev={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ey(4,13),y:ey(5,14)};ev.translateX=ev.x,ev.translateY=ev.y;let eT=e=>t=>t.test(e),eE=[en,eu,eh,el,ed,ec,{test:e=>"auto"===e,parse:e=>e}],eA=e=>eE.find(eT(e)),ew=new Set,eS=!1,ek=!1;function eC(){if(ek){let e=Array.from(ew).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t=function(e){let t=[];return ex.forEach(r=>{let s=e.getValue(r);void 0!==s&&(t.push([r,s.get()]),s.set(r.startsWith("scale")?1:0))}),t}(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{var s;null===(s=e.getValue(t))||void 0===s||s.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ek=!1,eS=!1,ew.forEach(e=>e.complete()),ew.clear()}function eM(){ew.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ek=!0)})}class eO{constructor(e,t,r,s,n,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=s,this.element=n,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ew.add(this),eS||(eS=!0,R.read(eM),R.resolveKeyframes(eC))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:s}=this;for(let n=0;nMath.round(1e5*e)/1e5,eP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,e$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eR=(e,t)=>r=>!!("string"==typeof r&&e$.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),eB=(e,t,r)=>s=>{if("string"!=typeof s)return s;let[n,i,o,a]=s.match(eP);return{[e]:parseFloat(n),[t]:parseFloat(i),[r]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},eN=e=>es(0,255,e),eD={...en,transform:e=>Math.round(eN(e))},eI={test:eR("rgb","red"),parse:eB("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:s=1})=>"rgba("+eD.transform(e)+", "+eD.transform(t)+", "+eD.transform(r)+", "+eL(ei.transform(s))+")"},e_={test:eR("#"),parse:function(e){let t="",r="",s="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),s=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),s=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,s+=s,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(s,16),alpha:n?parseInt(n,16)/255:1}},transform:eI.transform},eF={test:eR("hsl","hue"),parse:eB("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:s=1})=>"hsla("+Math.round(e)+", "+eh.transform(eL(t))+", "+eh.transform(eL(r))+", "+eL(ei.transform(s))+")"},eV={test:e=>eI.test(e)||e_.test(e)||eF.test(e),parse:e=>eI.test(e)?eI.parse(e):eF.test(e)?eF.parse(e):e_.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eI.transform(e):eF.transform(e)},eH=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eU="number",ej="color",eK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eG(e){let t=e.toString(),r=[],s={color:[],number:[],var:[]},n=[],i=0,o=t.replace(eK,e=>(eV.test(e)?(s.color.push(i),n.push(ej),r.push(eV.parse(e))):e.startsWith("var(")?(s.var.push(i),n.push("var"),r.push(e)):(s.number.push(i),n.push(eU),r.push(parseFloat(e))),++i,"${}")).split("${}");return{values:r,split:o,indexes:s,types:n}}function ez(e){return eG(e).values}function eY(e){let{split:t,types:r}=eG(e),s=t.length;return e=>{let n="";for(let i=0;i"number"==typeof e?0:e,eq={test:function(e){var t,r;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(eP))||void 0===t?void 0:t.length)||0)+((null===(r=e.match(eH))||void 0===r?void 0:r.length)||0)>0},parse:ez,createTransformer:eY,getAnimatableNone:function(e){let t=ez(e);return eY(e)(t.map(eW))}},eX=new Set(["brightness","contrast","saturate","opacity"]);function eZ(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[s]=r.match(eP)||[];if(!s)return e;let n=r.replace(s,""),i=eX.has(t)?1:0;return s!==r&&(i*=100),t+"("+i+n+")"}let eJ=/\b([a-z-]*)\(.*?\)/gu,eQ={...eq,getAnimatableNone:e=>{let t=e.match(eJ);return t?t.map(eZ).join(" "):e}},e0={...en,transform:Math.round},e1={borderWidth:eu,borderTopWidth:eu,borderRightWidth:eu,borderBottomWidth:eu,borderLeftWidth:eu,borderRadius:eu,radius:eu,borderTopLeftRadius:eu,borderTopRightRadius:eu,borderBottomRightRadius:eu,borderBottomLeftRadius:eu,width:eu,maxWidth:eu,height:eu,maxHeight:eu,top:eu,right:eu,bottom:eu,left:eu,padding:eu,paddingTop:eu,paddingRight:eu,paddingBottom:eu,paddingLeft:eu,margin:eu,marginTop:eu,marginRight:eu,marginBottom:eu,marginLeft:eu,backgroundPositionX:eu,backgroundPositionY:eu,rotate:el,rotateX:el,rotateY:el,rotateZ:el,scale:eo,scaleX:eo,scaleY:eo,scaleZ:eo,skew:el,skewX:el,skewY:el,distance:eu,translateX:eu,translateY:eu,translateZ:eu,x:eu,y:eu,z:eu,perspective:eu,transformPerspective:eu,opacity:ei,originX:ep,originY:ep,originZ:eu,zIndex:e0,size:eu,fillOpacity:ei,strokeOpacity:ei,numOctaves:e0},e2={...e1,color:eV,backgroundColor:eV,outlineColor:eV,fill:eV,stroke:eV,borderColor:eV,borderTopColor:eV,borderRightColor:eV,borderBottomColor:eV,borderLeftColor:eV,filter:eQ,WebkitFilter:eQ},e3=e=>e2[e];function e5(e,t){let r=e3(e);return r!==eQ&&(r=eq),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let e4=new Set(["auto","none","0"]);class e6 extends eO{constructor(e,t,r,s,n){super(e,t,r,s,n,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r{t.getValue(e).set(r)}),this.resolveNoneKeyframes()}}function e9(e){return"function"==typeof e}function e8(){s=void 0}let e7={now:()=>(void 0===s&&e7.set(N.isProcessing||A.useManualTiming?N.timestamp:performance.now()),s),set:e=>{s=e,queueMicrotask(e8)}},te=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eq.test(e)||"0"===e)&&!e.startsWith("url("));class tt{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:s=0,repeatDelay:n=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=e7.now(),this.options={autoplay:e,delay:t,type:r,repeat:s,repeatDelay:n,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eM(),eC()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=e7.now(),this.hasAttemptedResolve=!0;let{name:r,type:s,velocity:n,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,r,s){let n=e[0];if(null===n)return!1;if("display"===t||"visibility"===t)return!0;let i=e[e.length-1],o=te(n,t),a=te(i,t);return(0,q.K)(o===a,`You are trying to animate ${t} from "${n}" to "${i}". ${n} is not an animatable value - to enable this animation set ${n} to a value animatable to ${i} via the \`style\` property.`),!!o&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r{this.resolveFinishedPromise=e})}}function tr(e,t,r){var s,n;let i=Math.max(t-5,0);return s=r-e(i),(n=t-i)?1e3/n*s:0}function ts(e,t){return e*Math.sqrt(1-t*t)}let tn=["duration","bounce"],ti=["stiffness","damping","mass"];function to(e,t){return t.some(t=>void 0!==e[t])}function ta({keyframes:e,restDelta:t,restSpeed:r,...s}){let n;let i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:l,damping:h,mass:u,duration:c,velocity:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!to(e,ti)&&to(e,tn)){let r=function({duration:e=800,bounce:t=.25,velocity:r=0,mass:s=1}){let n,i;(0,q.K)(e<=m(10),"Spring duration must be 10 seconds or less");let o=1-t;o=es(.05,1,o),e=es(.01,10,g(e)),o<1?(n=t=>{let s=t*o,n=s*e;return .001-(s-r)/ts(t,o)*Math.exp(-n)},i=t=>{let s=t*o*e,i=Math.pow(o,2)*Math.pow(t,2)*e,a=ts(Math.pow(t,2),o);return(s*r+r-i)*Math.exp(-s)*(-n(t)+.001>0?-1:1)/a}):(n=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),i=t=>e*e*(r-t)*Math.exp(-t*e));let a=function(e,t,r){let s=r;for(let r=1;r<12;r++)s-=e(s)/t(s);return s}(n,i,5/e);if(e=m(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(a,2)*s;return{stiffness:t,damping:2*o*Math.sqrt(s*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...s,velocity:-g(s.velocity||0)}),f=d||0,y=h/(2*Math.sqrt(l*u)),b=o-i,x=g(Math.sqrt(l/u)),v=5>Math.abs(b);if(r||(r=v?.01:2),t||(t=v?.005:.5),y<1){let e=ts(x,y);n=t=>o-Math.exp(-y*x*t)*((f+y*x*b)/e*Math.sin(e*t)+b*Math.cos(e*t))}else if(1===y)n=e=>o-Math.exp(-x*e)*(b+(f+x*b)*e);else{let e=x*Math.sqrt(y*y-1);n=t=>{let r=Math.exp(-y*x*t),s=Math.min(e*t,300);return o-r*((f+y*x*b)*Math.sinh(s)+e*b*Math.cosh(s))/e}}return{calculatedDuration:p&&c||null,next:e=>{let s=n(e);if(p)a.done=e>=c;else{let i=0;y<1&&(i=0===e?m(f):tr(n,e,s));let l=Math.abs(i)<=r,h=Math.abs(o-s)<=t;a.done=l&&h}return a.value=a.done?o:s,a}}}function tl({keyframes:e,velocity:t=0,power:r=.8,timeConstant:s=325,bounceDamping:n=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let c,d;let p=e[0],f={done:!1,value:p},m=e=>void 0!==a&&el,g=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)-y*Math.exp(-e/s),T=e=>x+v(e),E=e=>{let t=v(e),r=T(e);f.done=Math.abs(t)<=h,f.value=f.done?x:r},A=e=>{m(f.value)&&(c=e,d=ta({keyframes:[f.value,g(f.value)],velocity:tr(T,e,f.value),damping:n,stiffness:i,restDelta:h,restSpeed:u}))};return A(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==c||(t=!0,E(e),A(e)),void 0!==c&&e>=c)?d.next(e-c):(t||E(e),f)}}}let th=_(.42,0,1,1),tu=_(0,0,.58,1),tc=_(.42,0,.58,1),td=e=>Array.isArray(e)&&"number"!=typeof e[0],tp={linear:L.Z,easeIn:th,easeInOut:tc,easeOut:tu,circIn:G,circInOut:Y,circOut:z,backIn:U,backInOut:j,backOut:H,anticipate:K},tf=e=>{if(Array.isArray(e)){(0,q.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,s,n]=e;return _(t,r,s,n)}return"string"==typeof e?((0,q.k)(void 0!==tp[e],`Invalid easing type '${e}'`),tp[e]):e},tm=(e,t)=>r=>t(e(r)),tg=(...e)=>e.reduce(tm),ty=(e,t,r)=>{let s=t-e;return 0===s?1:(r-e)/s},tb=(e,t,r)=>e+(t-e)*r;function tx(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function tv(e,t){return r=>r>0?t:e}let tT=(e,t,r)=>{let s=e*e,n=r*(t*t-s)+s;return n<0?0:Math.sqrt(n)},tE=[e_,eI,eF],tA=e=>tE.find(t=>t.test(e));function tw(e){let t=tA(e);if((0,q.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===eF&&(r=function({hue:e,saturation:t,lightness:r,alpha:s}){e/=360,r/=100;let n=0,i=0,o=0;if(t/=100){let s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;n=tx(a,s,e+1/3),i=tx(a,s,e),o=tx(a,s,e-1/3)}else n=i=o=r;return{red:Math.round(255*n),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}(r)),r}let tS=(e,t)=>{let r=tw(e),s=tw(t);if(!r||!s)return tv(e,t);let n={...r};return e=>(n.red=tT(r.red,s.red,e),n.green=tT(r.green,s.green,e),n.blue=tT(r.blue,s.blue,e),n.alpha=tb(r.alpha,s.alpha,e),eI.transform(n))},tk=new Set(["none","hidden"]);function tC(e,t){return r=>tb(e,t,r)}function tM(e){return"number"==typeof e?tC:"string"==typeof e?ee(e)?tv:eV.test(e)?tS:tP:Array.isArray(e)?tO:"object"==typeof e?eV.test(e)?tS:tL:tv}function tO(e,t){let r=[...e],s=r.length,n=e.map((e,r)=>tM(e)(e,t[r]));return e=>{for(let t=0;t{for(let t in s)r[t]=s[t](e);return r}}let tP=(e,t)=>{let r=eq.createTransformer(t),s=eG(e),n=eG(t);return s.indexes.var.length===n.indexes.var.length&&s.indexes.color.length===n.indexes.color.length&&s.indexes.number.length>=n.indexes.number.length?tk.has(e)&&!n.values.length||tk.has(t)&&!s.values.length?tk.has(e)?r=>r<=0?e:t:r=>r>=1?t:e:tg(tO(function(e,t){var r;let s=[],n={color:0,var:0,number:0};for(let i=0;it[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,r){let s=[],n=r||t$,i=e.length-1;for(let r=0;r{let r=0;if(a>1)for(;rl(es(e[0],e[i-1],t)):l}((r&&r.length===t.length?r:function(e){let t=[0];return function(e,t){let r=e[e.length-1];for(let s=1;s<=t;s++){let n=ty(0,t,s);e.push(tb(r,1,n))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(n)?n:t.map(()=>n||tc).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(i.value=o(t),i.done=t>=e,i)}}let tB=e=>{let t=({timestamp:t})=>e(t);return{start:()=>R.update(t,!0),stop:()=>B(t),now:()=>N.isProcessing?N.timestamp:e7.now()}},tN={decay:tl,inertia:tl,tween:tR,keyframes:tR,spring:ta},tD=e=>e/100;class tI extends tt{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:r,element:s,keyframes:n}=this.options,i=(null==s?void 0:s.KeyframeResolver)||eO;this.resolver=new i(n,(e,t)=>this.onKeyframesResolved(e,t),t,r,s),this.resolver.scheduleResolve()}initPlayback(e){let t,r;let{type:s="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,l=e9(s)?s:tN[s]||tR;l!==tR&&"number"!=typeof e[0]&&(t=tg(tD,t$(e[0],e[1])),e=[0,100]);let h=l({...this.options,keyframes:e});"mirror"===o&&(r=l({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===h.calculatedDuration&&(h.calculatedDuration=function(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}(h));let{calculatedDuration:u}=h,c=u+i;return{generator:h,mirroredGenerator:r,mapPercentToKeyframes:t,calculatedDuration:u,resolvedDuration:c,totalDuration:c*(n+1)-i}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:r}=this;if(!r){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:s,generator:n,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:h,resolvedDuration:u}=r;if(null===this.startTime)return n.next(0);let{delay:c,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-h/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-c*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>h;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=h);let b=this.currentTime,x=n;if(d){let e=Math.min(this.currentTime,h)/u,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,d+1))%2&&("reverse"===p?(r=1-r,f&&(r-=f/u)):"mirror"===p&&(x=i)),b=es(0,1,r)*u}let v=y?{done:!1,value:a[0]}:x.next(b);o&&(v.value=o(v.value));let{done:T}=v;y||null===l||(T=this.speed>=0?this.currentTime>=h:this.currentTime<=0);let E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return E&&void 0!==s&&(v.value=k(a,this.options,s)),m&&m(v.value),E&&this.finish(),v}get duration(){let{resolved:e}=this;return e?g(e.calculatedDuration):0}get time(){return g(this.currentTime)}set time(e){e=m(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=g(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=tB,onPlay:t,startTime:r}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=r?r:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let t_=new Set(["opacity","clipPath","filter","transform"]),tF=e=>Array.isArray(e)&&"number"==typeof e[0],tV=(e,t)=>{let r="",s=Math.max(Math.round(t/10),2);for(let t=0;t(void 0===t&&(t=e()),t)}let tU={linearEasing:void 0},tj=function(e,t){let r=tH(e);return()=>{var e;return null!==(e=tU[t])&&void 0!==e?e:r()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),tK=([e,t,r,s])=>`cubic-bezier(${e}, ${t}, ${r}, ${s})`,tG={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tK([0,.65,.55,1]),circOut:tK([.55,0,1,.45]),backIn:tK([.31,.01,.66,-.59]),backOut:tK([.33,1.53,.69,.99])};function tz(e,t){e.timeline=t,e.onfinish=null}let tY=tH(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tW={anticipate:K,backInOut:j,circInOut:Y};class tq extends tt{constructor(e){super(e);let{name:t,motionValue:r,element:s,keyframes:n}=this.options;this.resolver=new e6(n,(e,t)=>this.onKeyframesResolved(e,t),t,r,s),this.resolver.scheduleResolve()}initPlayback(e,t){var r,s;let{duration:n=300,times:i,ease:o,type:a,motionValue:l,name:h,startTime:u}=this.options;if(!(null===(r=l.owner)||void 0===r?void 0:r.current))return!1;if("string"==typeof o&&tj()&&o in tW&&(o=tW[o]),e9((s=this.options).type)||"spring"===s.type||!function e(t){return!!("function"==typeof t&&tj()||!t||"string"==typeof t&&(t in tG||tj())||tF(t)||Array.isArray(t)&&t.every(e))}(s.ease)){let{onComplete:t,onUpdate:r,motionValue:s,element:l,...h}=this.options,u=function(e,t){let r=new tI({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),s={done:!1,value:e[0]},n=[],i=0;for(;!s.done&&i<2e4;)n.push((s=r.sample(i)).value),i+=10;return{times:void 0,keyframes:n,duration:i-10,ease:"linear"}}(e,h);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,i=u.times,o=u.ease,a="keyframes"}let c=function(e,t,r,{delay:s=0,duration:n=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){let h={[t]:r};l&&(h.offset=l);let u=function e(t,r){if(t)return"function"==typeof t&&tj()?tV(t,r):tF(t)?tK(t):Array.isArray(t)?t.map(t=>e(t,r)||tG.easeOut):tG[t]}(a,n);return Array.isArray(u)&&(h.easing=u),e.animate(h,{delay:s,duration:n,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(l.owner.current,h,e,{...this.options,duration:n,times:i,ease:o});return c.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(tz(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:r}=this.options;l.set(k(e,this.options,t)),r&&r(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:a,ease:o,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return g(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return g(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.currentTime=m(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return L.Z;let{animation:r}=t;tz(r,e)}else this.pendingTimeline=e;return L.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:r,duration:s,type:n,ease:i,times:o}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:a,element:l,...h}=this.options,u=new tI({...h,keyframes:r,duration:s,type:n,ease:i,times:o,isGenerator:!0}),c=m(this.time);e.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:r,repeatDelay:s,repeatType:n,damping:i,type:o}=e;return tY()&&r&&t_.has(r)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!s&&"mirror"!==n&&0!==i&&"inertia"!==o}}let tX=tH(()=>void 0!==window.ScrollTimeline);class tZ{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;rtX()&&r.attachTimeline?r.attachTimeline(e):t(r));return()=>{r.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;tt[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let tJ=(e,t,r,s={},n,i)=>o=>{let a=E(s,e)||{},l=a.delay||s.delay||0,{elapsed:h=0}=s;h-=m(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-h,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:n};!function({when:e,delay:t,delayChildren:r,staggerChildren:s,staggerDirection:n,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length}(a)&&(u={...u,...T(e,u)}),u.duration&&(u.duration=m(u.duration)),u.repeatDelay&&(u.repeatDelay=m(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(u.duration=0,0!==u.delay||(c=!0)),(w.current||A.skipAnimations)&&(c=!0,u.duration=0,u.delay=0),c&&!i&&void 0!==t.get()){let e=k(u.keyframes,a);if(void 0!==e)return R.update(()=>{u.onUpdate(e),u.onComplete()}),new tZ([])}return!i&&tq.supports(u)?new tq(u):new tI(u)},tQ=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),t0=e=>i(e)?e[e.length-1]||0:e;function t1(e,t){-1===e.indexOf(t)&&e.push(t)}function t2(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class t3{constructor(){this.subscriptions=[]}add(e){return t1(this.subscriptions,e),()=>t2(this.subscriptions,e)}notify(e,t,r){let s=this.subscriptions.length;if(s){if(1===s)this.subscriptions[0](e,t,r);else for(let n=0;n!isNaN(parseFloat(e)),t4={current:void 0};class t6{constructor(e,t={}){this.version="11.11.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let r=e7.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e7.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=t5(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new t3);let r=this.events[e].add(t);return"change"===e?()=>{r(),R.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return t4.current&&t4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e7.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t9(e,t){return new t6(e,t)}let t8=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),t7="data-"+t8("framerAppearId"),re=e=>!!(e&&e.getVelocity);function rt(e){return f.has(e)?"transform":t_.has(e)?t8(e):void 0}function rr(e,t){var r;if(!e.applyWillChange)return;let s=e.getValue("willChange");if(re(s)&&s.add)return s.add(t);!(null===(r=e.props.style)||void 0===r?void 0:r.willChange)&&rt(t)&&e.setStaticValue("willChange","transform")}function rs(e,t,{delay:r=0,transitionOverride:s,type:n}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;s&&(o=s);let h=[],c=n&&e.animationState&&e.animationState.getState()[n];for(let t in l){let s=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),n=l[t];if(void 0===n||c&&function({protectedKeys:e,needsAnimating:t},r){let s=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,s}(c,t))continue;let a={delay:r,...E(o||{},t)},u=!1;if(window.MotionHandoffAnimation){let r=e.props[t7];if(r){let e=window.MotionHandoffAnimation(r,t,R);null!==e&&(a.startTime=e,u=!0)}}rr(e,t),s.start(tJ(t,s,n,e.shouldReduceMotion&&f.has(t)?{type:!1}:a,e,u));let d=s.animation;d&&h.push(d)}return a&&Promise.all(h).then(()=>{R.update(()=>{a&&function(e,t){let{transitionEnd:r={},transition:s={},...n}=u(e,t)||{};for(let t in n={...n,...r}){let r=t0(n[t]);e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,t9(r))}}(e,a)})}),h}function rn(e,t,r={}){var s;let n=u(e,t,"exit"===r.type?null===(s=e.presenceContext)||void 0===s?void 0:s.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);let o=n?()=>Promise.all(rs(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(s=0)=>{let{delayChildren:n=0,staggerChildren:o,staggerDirection:a}=i;return function(e,t,r=0,s=0,n=1,i){let o=[],a=(e.variantChildren.size-1)*s,l=1===n?(e=0)=>e*s:(e=0)=>a-e*s;return Array.from(e.variantChildren).sort(ri).forEach((e,s)=>{e.notify("AnimationStart",t),o.push(rn(e,t,{...i,delay:r+l(s)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(o)}(e,t,n+s,o,a,r)}:()=>Promise.resolve(),{when:l}=i;if(!l)return Promise.all([o(),a(r.delay)]);{let[e,t]="beforeChildren"===l?[o,a]:[a,o];return e().then(()=>t())}}function ri(e,t){return e.sortNodePosition(t)}let ro=d.length,ra=[...c].reverse(),rl=c.length;function rh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ru(){return{animate:rh(!0),whileInView:rh(),whileHover:rh(),whileTap:rh(),whileDrag:rh(),whileFocus:rh(),exit:rh()}}class rc{constructor(e){this.isMounted=!1,this.node=e}update(){}}class rd extends rc{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let s;if(e.notify("AnimationStart",t),Array.isArray(t))s=Promise.all(t.map(t=>rn(e,t,r)));else if("string"==typeof t)s=rn(e,t,r);else{let n="function"==typeof t?u(e,t,r.custom):t;s=Promise.all(rs(e,n,r))}return s.then(()=>{e.notify("AnimationComplete",t)})})(e,t,r))),r=ru(),s=!0,l=t=>(r,s)=>{var n;let i=u(e,s,"exit"===t?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0);if(i){let{transition:e,transitionEnd:t,...s}=i;r={...r,...s,...t}}return r};function h(h){let{props:u}=e,c=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;eg&&v,S=!1,k=Array.isArray(x)?x:[x],C=k.reduce(l(d),{});!1===T&&(C={});let{prevResolvedValues:M={}}=b,O={...M,...C},L=t=>{w=!0,f.has(t)&&(S=!0,f.delete(t)),b.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in O){let t=C[e],r=M[e];if(!m.hasOwnProperty(e))(i(t)&&i(r)?o(t,r):t===r)?void 0!==t&&f.has(e)?L(e):b.protectedKeys[e]=!0:null!=t?L(e):f.add(e)}b.prevProp=x,b.prevResolvedValues=C,b.isActive&&(m={...m,...C}),s&&e.blockInitialAnimation&&(w=!1);let P=!(E&&A)||S;w&&P&&p.push(...k.map(e=>({animation:e,options:{type:d}})))}if(f.size){let t={};f.forEach(r=>{let s=e.getBaseTarget(r),n=e.getValue(r);n&&(n.liveStyle=!0),t[r]=null!=s?s:null}),p.push({animation:t})}let b=!!p.length;return s&&(!1===u.initial||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(p):Promise.resolve()}return{animateChanges:h,setActive:function(t,s){var n;if(r[t].isActive===s)return Promise.resolve();null===(n=e.variantChildren)||void 0===n||n.forEach(e=>{var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,s)}),r[t].isActive=s;let i=h(t);for(let e in r)r[e].protectedKeys={};return i},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=ru(),s=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();n(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let rp=0;class rf extends rc{constructor(){super(...arguments),this.id=rp++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}let rm=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rg(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}let ry=e=>t=>rm(t)&&e(t,rg(t));function rb(e,t,r,s={passive:!0}){return e.addEventListener(t,r,s),()=>e.removeEventListener(t,r)}function rx(e,t,r,s){return rb(e,t,ry(r),s)}let rv=(e,t)=>Math.abs(e-t);class rT{constructor(e,t,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:n=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=rw(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,n=(e=r.offset,t={x:0,y:0},Math.sqrt(rv(e.x,t.x)**2+rv(e.y,t.y)**2)>=3);if(!s&&!n)return;let{point:i}=r,{timestamp:o}=N;this.history.push({...i,timestamp:o});let{onStart:a,onMove:l}=this.handlers;s||(a&&a(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=rE(t,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:s,resumeAnimation:n}=this.handlers;if(this.dragSnapToOrigin&&n&&n(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=rw("pointercancel"===e.type?this.lastMoveEventInfo:rE(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,i),s&&s(e,i)},!rm(e))return;this.dragSnapToOrigin=n,this.handlers=t,this.transformPagePoint=r,this.contextWindow=s||window;let i=rE(rg(e),this.transformPagePoint),{point:o}=i,{timestamp:a}=N;this.history=[{...o,timestamp:a}];let{onSessionStart:l}=t;l&&l(e,rw(i,this.history)),this.removeListeners=tg(rx(this.contextWindow,"pointermove",this.handlePointerMove),rx(this.contextWindow,"pointerup",this.handlePointerUp),rx(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),B(this.updatePoint)}}function rE(e,t){return t?{point:t(e.point)}:e}function rA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rw({point:e},t){return{point:e,delta:rA(e,rS(t)),offset:rA(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,s=null,n=rS(e);for(;r>=0&&(s=e[r],!(n.timestamp-s.timestamp>m(.1)));)r--;if(!s)return{x:0,y:0};let i=g(n.timestamp-s.timestamp);if(0===i)return{x:0,y:0};let o={x:(n.x-s.x)/i,y:(n.y-s.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(t,0)}}function rS(e){return e[e.length-1]}function rk(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let rC=rk("dragHorizontal"),rM=rk("dragVertical");function rO(e){let t=!1;if("y"===e)t=rM();else if("x"===e)t=rC();else{let e=rC(),r=rM();e&&r?t=()=>{e(),r()}:(e&&e(),r&&r())}return t}function rL(){let e=rO(!0);return!e||(e(),!1)}function rP(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function r$(e){return e.max-e.min}function rR(e,t,r,s=.5){e.origin=s,e.originPoint=tb(t.min,t.max,e.origin),e.scale=r$(r)/r$(t),e.translate=tb(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rB(e,t,r,s){rR(e.x,t.x,r.x,s?s.originX:void 0),rR(e.y,t.y,r.y,s?s.originY:void 0)}function rN(e,t,r){e.min=r.min+t.min,e.max=e.min+r$(t)}function rD(e,t,r){e.min=t.min-r.min,e.max=e.min+r$(t)}function rI(e,t,r){rD(e.x,t.x,r.x),rD(e.y,t.y,r.y)}function r_(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function rF(e,t){let r=t.min-e.min,s=t.max-e.max;return t.max-t.min({translate:0,scale:1,origin:0,originPoint:0}),rj=()=>({x:rU(),y:rU()}),rK=()=>({min:0,max:0}),rG=()=>({x:rK(),y:rK()});function rz(e){return[e("x"),e("y")]}function rY({top:e,left:t,right:r,bottom:s}){return{x:{min:t,max:r},y:{min:e,max:s}}}function rW(e){return void 0===e||1===e}function rq({scale:e,scaleX:t,scaleY:r}){return!rW(e)||!rW(t)||!rW(r)}function rX(e){return rq(e)||rZ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rZ(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function rJ(e,t,r,s,n){return void 0!==n&&(e=s+n*(e-s)),s+r*(e-s)+t}function rQ(e,t=0,r=1,s,n){e.min=rJ(e.min,t,r,s,n),e.max=rJ(e.max,t,r,s,n)}function r0(e,{x:t,y:r}){rQ(e.x,t.translate,t.scale,t.originPoint),rQ(e.y,r.translate,r.scale,r.originPoint)}function r1(e,t){e.min=e.min+t,e.max=e.max+t}function r2(e,t,r,s,n=.5){let i=tb(e.min,e.max,n);rQ(e,t,r,i,s)}function r3(e,t){r2(e.x,t.x,t.scaleX,t.scale,t.originX),r2(e.y,t.y,t.scaleY,t.scale,t.originY)}function r5(e,t){return rY(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}let r4=({current:e})=>e?e.ownerDocument.defaultView:null,r6=new WeakMap;class r9{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rG(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let{dragSnapToOrigin:s}=this.getProps();this.panSession=new rT(e,{onSessionStart:e=>{let{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(rg(e,"page").point)},onStart:(e,t)=>{let{drag:r,dragPropagation:s,onDragStart:n}=this.getProps();if(r&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=rO(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rz(e=>{let t=this.getAxisMotionValue(e).get()||0;if(eh.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let s=r.layout.layoutBox[e];if(s){let e=r$(s);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),n&&R.postRender(()=>n(e,t)),rr(this.visualElement,"transform");let{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:r,dragDirectionLock:s,onDirectionLock:n,onDrag:i}=this.getProps();if(!r&&!this.openGlobalLock)return;let{offset:o}=t;if(s&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(o),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>rz(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:r4(this.visualElement)})}stop(e,t){let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:s}=t;this.startAnimation(s);let{onDragEnd:n}=this.getProps();n&&R.postRender(()=>n(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){let{drag:s}=this.getProps();if(!r||!r8(e,s,this.currentDirection))return;let n=this.getAxisMotionValue(e),i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:r},s){return void 0!==t&&er&&(e=s?tb(r,e,s.max):Math.min(e,r)),e}(i,this.constraints[e],this.elastic[e])),n.set(i)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,n=this.constraints;t&&rP(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=function(e,{top:t,left:r,bottom:s,right:n}){return{x:r_(e.x,r,n),y:r_(e.y,t,s)}}(s.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:rV(e,"left","right"),y:rV(e,"top","bottom")}}(r),n!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&rz(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(s.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!rP(t))return!1;let s=t.current;(0,q.k)(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let i=function(e,t,r){let s=r5(e,r),{scroll:n}=t;return n&&(r1(s.x,n.offset.x),r1(s.y,n.offset.y)),s}(s,n.root,this.visualElement.getTransformPagePoint()),o={x:rF((e=n.layout.layoutBox).x,i.x),y:rF(e.y,i.y)};if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=rY(e))}return o}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:s,dragTransition:n,dragSnapToOrigin:i,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(rz(o=>{if(!r8(o,t,this.currentDirection))return;let l=a&&a[o]||{};i&&(l={min:0,max:0});let h={type:"inertia",velocity:r?e[o]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return rr(this.visualElement,e),r.start(tJ(e,r,0,t,this.visualElement,!1))}stopAnimation(){rz(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rz(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){rz(t=>{let{drag:r}=this.getProps();if(!r8(t,r,this.currentDirection))return;let{projection:s}=this.visualElement,n=this.getAxisMotionValue(t);if(s&&s.layout){let{min:r,max:i}=s.layout.layoutBox[t];n.set(e[t]-tb(r,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!rP(t)||!r||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};rz(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let r=t.get();s[e]=function(e,t){let r=.5,s=r$(e),n=r$(t);return n>s?r=ty(t.min,t.max-s,e.min):s>n&&(r=ty(e.min,e.max-n,t.min)),es(0,1,r)}({min:r,max:r},this.constraints[e])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rz(t=>{if(!r8(t,e,null))return;let r=this.getAxisMotionValue(t),{min:n,max:i}=this.constraints[t];r.set(tb(n,i,s[t]))})}addListeners(){if(!this.visualElement.current)return;r6.set(this.visualElement,this);let e=rx(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();rP(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),R.read(t);let n=rb(window,"resize",()=>this.scalePositionWithinConstraints()),i=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rz(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{n(),e(),s(),i&&i()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:n=!1,dragElastic:i=.35,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:s,dragConstraints:n,dragElastic:i,dragMomentum:o}}}function r8(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}class r7 extends rc{constructor(e){super(e),this.removeGroupControls=L.Z,this.removeListeners=L.Z,this.controls=new r9(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L.Z}unmount(){this.removeGroupControls(),this.removeListeners()}}let se=e=>(t,r)=>{e&&R.postRender(()=>e(t,r))};class st extends rc{constructor(){super(...arguments),this.removePointerDownListener=L.Z}onPointerDown(e){this.session=new rT(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:r4(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:se(e),onStart:se(t),onMove:r,onEnd:(e,t)=>{delete this.session,s&&R.postRender(()=>s(e,t))}}}mount(){this.removePointerDownListener=rx(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var sr=r(57437),ss=r(2265),sn=r(64252),si=r(58881);let so=(0,ss.createContext)({}),sa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let sh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!eu.test(e))return e;e=parseFloat(e)}let r=sl(e,t.target.x),s=sl(e,t.target.y);return`${r}% ${s}%`}},su={},{schedule:sc,cancel:sd}=$(queueMicrotask,!1);class sp extends ss.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:s}=this.props,{projection:n}=e;Object.assign(su,sm),n&&(t.group&&t.group.add(n),r&&r.register&&s&&r.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),sa.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:s,isPresent:n}=this.props,i=r.projection;return i&&(i.isPresent=n,s||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent===n||(n?i.promote():i.relegate()||R.postRender(()=>{let e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sf(e){let[t,r]=function(){let e=(0,ss.useContext)(sn.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:r,register:s}=e,n=(0,ss.useId)();(0,ss.useEffect)(()=>s(n),[]);let i=(0,ss.useCallback)(()=>r&&r(n),[n,r]);return!t&&r?[!1,i]:[!0]}(),s=(0,ss.useContext)(si.p);return(0,sr.jsx)(sp,{...e,layoutGroup:s,switchLayoutGroup:(0,ss.useContext)(so),isPresent:t,safeToRemove:r})}let sm={borderRadius:{...sh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sh,borderTopRightRadius:sh,borderBottomLeftRadius:sh,borderBottomRightRadius:sh,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let s=eq.parse(e);if(s.length>5)return e;let n=eq.createTransformer(e),i="number"!=typeof s[0]?1:0,o=r.x.scale*t.x,a=r.y.scale*t.y;s[0+i]/=o,s[1+i]/=a;let l=tb(o,a,.5);return"number"==typeof s[2+i]&&(s[2+i]/=l),"number"==typeof s[3+i]&&(s[3+i]/=l),n(s)}}},sg=["TopLeft","TopRight","BottomLeft","BottomRight"],sy=sg.length,sb=e=>"string"==typeof e?parseFloat(e):e,sx=e=>"number"==typeof e||eu.test(e);function sv(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let sT=sA(0,.5,z),sE=sA(.5,.95,L.Z);function sA(e,t,r){return s=>st?1:r(ty(e,t,s))}function sw(e,t){e.min=t.min,e.max=t.max}function sS(e,t){sw(e.x,t.x),sw(e.y,t.y)}function sk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sC(e,t,r,s,n){return e-=t,e=s+1/r*(e-s),void 0!==n&&(e=s+1/n*(e-s)),e}function sM(e,t,[r,s,n],i,o){!function(e,t=0,r=1,s=.5,n,i=e,o=e){if(eh.test(t)&&(t=parseFloat(t),t=tb(o.min,o.max,t/100)-o.min),"number"!=typeof t)return;let a=tb(i.min,i.max,s);e===i&&(a-=t),e.min=sC(e.min,t,r,a,n),e.max=sC(e.max,t,r,a,n)}(e,t[r],t[s],t[n],t.scale,i,o)}let sO=["x","scaleX","originX"],sL=["y","scaleY","originY"];function sP(e,t,r,s){sM(e.x,t,sO,r?r.x:void 0,s?s.x:void 0),sM(e.y,t,sL,r?r.y:void 0,s?s.y:void 0)}function s$(e){return 0===e.translate&&1===e.scale}function sR(e){return s$(e.x)&&s$(e.y)}function sB(e,t){return e.min===t.min&&e.max===t.max}function sN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sD(e,t){return sN(e.x,t.x)&&sN(e.y,t.y)}function sI(e){return r$(e.x)/r$(e.y)}function s_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sF{constructor(){this.members=[]}add(e){t1(this.members,e),e.scheduleRender()}remove(e){if(t2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:s}=e.options;!1===s&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let sV=(e,t)=>e.depth-t.depth;class sH{constructor(){this.children=[],this.isDirty=!1}add(e){t1(this.children,e),this.isDirty=!0}remove(e){t2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sV),this.isDirty=!1,this.children.forEach(e)}}function sU(e){let t=re(e)?e.get():e;return tQ(t)?t.toValue():t}let sj={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},sK="undefined"!=typeof window&&void 0!==window.MotionDebug,sG=["","X","Y","Z"],sz={visibility:"hidden"},sY=0;function sW(e,t,r,s){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),s&&(s[e]=0))}function sq({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:s,resetTransform:n}){return class{constructor(e={},r=null==t?void 0:t()){this.id=sY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,sK&&(sj.totalNodes=sj.resolvedTargetDeltas=sj.recalculatedProjection=0),this.nodes.forEach(sJ),this.nodes.forEach(s4),this.nodes.forEach(s6),this.nodes.forEach(sQ),sK&&window.MotionDebug.record(sj)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){let r=e7.now(),s=({timestamp:t})=>{let n=t-r;n>=250&&(B(s),e(n-250))};return R.read(s,!0),()=>B(s)}(s,0),sa.hasAnimatedSinceResize&&(sa.hasAnimatedSinceResize=!1,this.nodes.forEach(s5))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&i&&(s||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:r,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||i.getDefaultTransition()||nr,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!sD(this.targetLayout,s)||r,h=!t&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||h||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,h);let t={...E(n,"layout"),onPlay:o,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||s5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,B(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(s9),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let s=r.props[t7];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",R,!(e||r))}let{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&e(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}})(this.layoutCorrected,this.treeScale,this.path,r),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=rG());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sk(this.prevProjectionDelta.x,this.projectionDelta.x),sk(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rB(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&s_(this.projectionDelta.x,this.prevProjectionDelta.x)&&s_(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),sK&&sj.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rj(),this.projectionDelta=rj(),this.projectionDeltaWithTransform=rj()}setAnimationOrigin(e,t=!1){let r;let s=this.snapshot,n=s?s.latestValues:{},i={...this.latestValues},o=rj();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let a=rG(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(nt));this.animationProgress=0,this.mixTargetDelta=t=>{let s=t/1e3;if(s7(o.x,e.x,s),s7(o.y,e.y,s),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,d,p,f;rI(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,ne(p.x,f.x,a.x,s),ne(p.y,f.y,a.y,s),r&&(h=this.relativeTarget,d=r,sB(h.x,d.x)&&sB(h.y,d.y))&&(this.isProjectionDirty=!1),r||(r=rG()),sS(r,this.relativeTarget)}l&&(this.animationValues=i,function(e,t,r,s,n,i){n?(e.opacity=tb(0,void 0!==r.opacity?r.opacity:1,sT(s)),e.opacityExit=tb(void 0!==t.opacity?t.opacity:1,0,sE(s))):i&&(e.opacity=tb(void 0!==t.opacity?t.opacity:1,void 0!==r.opacity?r.opacity:1,s));for(let n=0;n{sa.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,r){let s=re(0)?0:t9(0);return s.start(tJ("",s,1e3,r)),s.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:s,latestValues:n}=e;if(t&&r&&s){if(this!==e&&this.layout&&s&&no(this.options.animationType,this.layout.layoutBox,s.layoutBox)){r=this.target||rG();let t=r$(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let s=r$(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+s}sS(t,r),r3(t,n),rB(this.projectionDeltaWithTransform,this.layoutCorrected,t,n)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new sF),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let s=this.getStack();s&&s.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let s={};r.z&&sW("z",e,s,this.animationValues);for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(s1),this.root.sharedNodes.clear()}}}function sX(e){e.updateLayout()}function sZ(e){var t;let r=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:s}=e.layout,{animationType:n}=e.options,i=r.source!==e.layout.source;"size"===n?rz(e=>{let s=i?r.measuredBox[e]:r.layoutBox[e],n=r$(s);s.min=t[e].min,s.max=s.min+n}):no(n,r.layoutBox,t)&&rz(s=>{let n=i?r.measuredBox[s]:r.layoutBox[s],o=r$(t[s]);n.max=n.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[s].max=e.relativeTarget[s].min+o)});let o=rj();rB(o,t,r.layoutBox);let a=rj();i?rB(a,e.applyTransform(s,!0),r.measuredBox):rB(a,t,r.layoutBox);let l=!sR(o),h=!1;if(!e.resumeFrom){let s=e.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:n,layout:i}=s;if(n&&i){let o=rG();rI(o,r.layoutBox,n.layoutBox);let a=rG();rI(a,t,i.layoutBox),sD(o,a)||(h=!0),s.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=o,e.relativeParent=s)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:r,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:h})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function sJ(e){sK&&sj.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sQ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s0(e){e.clearSnapshot()}function s1(e){e.clearMeasurements()}function s2(e){e.isLayoutDirty=!1}function s3(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function s5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s4(e){e.resolveTargetDelta()}function s6(e){e.calcProjection()}function s9(e){e.resetSkewAndRotation()}function s8(e){e.removeLeadSnapshot()}function s7(e,t,r){e.translate=tb(t.translate,0,r),e.scale=tb(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function ne(e,t,r,s){e.min=tb(t.min,r.min,s),e.max=tb(t.max,r.max,s)}function nt(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nr={duration:.45,ease:[.4,0,.1,1]},ns=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nn=ns("applewebkit/")&&!ns("chrome/")?Math.round:L.Z;function ni(e){e.min=nn(e.min),e.max=nn(e.max)}function no(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(sI(t)-sI(r)))}function na(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let nl=sq({attachResizeListener:(e,t)=>rb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nh={current:void 0},nu=sq({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nh.current){let e=new nl({});e.mount(window),e.setOptions({layoutScroll:!0}),nh.current=e}return nh.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function nc(e,t){let r=t?"onHoverStart":"onHoverEnd";return rx(e.current,t?"pointerenter":"pointerleave",(s,n)=>{if("touch"===s.pointerType||rL())return;let i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);let o=i[r];o&&R.postRender(()=>o(s,n))},{passive:!e.getProps()[r]})}class nd extends rc{mount(){this.unmount=tg(nc(this.node,!0),nc(this.node,!1))}unmount(){}}class np extends rc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tg(rb(this.node.current,"focus",()=>this.onFocus()),rb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let nf=(e,t)=>!!t&&(e===t||nf(e,t.parentElement));function nm(e,t){if(!t)return;let r=new PointerEvent("pointer"+e);t(r,rg(r))}class ng extends rc{constructor(){super(...arguments),this.removeStartListeners=L.Z,this.removeEndListeners=L.Z,this.removeAccessibleListeners=L.Z,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let r=this.node.getProps(),s=rx(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:r,onTapCancel:s,globalTapTarget:n}=this.node.getProps(),i=n||nf(this.node.current,e.target)?r:s;i&&R.update(()=>i(e,t))},{passive:!(r.onTap||r.onPointerUp)}),n=rx(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=tg(s,n),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=rb(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=rb(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&nm("up",(e,t)=>{let{onTap:r}=this.node.getProps();r&&R.postRender(()=>r(e,t))})}),nm("down",(e,t)=>{this.startPress(e,t)}))}),t=rb(this.node.current,"blur",()=>{this.isPressing&&nm("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=tg(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:r,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&R.postRender(()=>r(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rL()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:r}=this.node.getProps();r&&R.postRender(()=>r(e,t))}mount(){let e=this.node.getProps(),t=rx(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=rb(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=tg(t,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let ny=new WeakMap,nb=new WeakMap,nx=e=>{let t=ny.get(e.target);t&&t(e)},nv=e=>{e.forEach(nx)},nT={some:0,all:1};class nE extends rc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:s="some",once:n}=e,i={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof s?s:nT[s]};return function(e,t,r){let s=function({root:e,...t}){let r=e||document;nb.has(r)||nb.set(r,{});let s=nb.get(r),n=JSON.stringify(t);return s[n]||(s[n]=new IntersectionObserver(nv,{root:e,...t})),s[n]}(t);return ny.set(e,r),s.observe(e),()=>{ny.delete(e),s.unobserve(e)}}(this.node.current,i,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,n&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:s}=this.node.getProps(),i=t?r:s;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}var nA=r(45750);let nw=(0,ss.createContext)({});var nS=r(11534);let nk=(0,ss.createContext)({strict:!1});function nC(e){return n(e.animate)||d.some(t=>a(e[t]))}function nM(e){return!!(nC(e)||e.variants)}function nO(e){return Array.isArray(e)?e.join(" "):e}let nL={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},nP={};for(let e in nL)nP[e]={isEnabled:t=>nL[e].some(e=>!!t[e])};var n$=r(44563);let nR=Symbol.for("motionComponentSymbol"),nB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function nN(e){if("string"!=typeof e||e.includes("-"));else if(nB.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function nD(e,{style:t,vars:r},s,n){for(let i in Object.assign(e.style,t,n&&n.getProjectionStyles(s)),r)e.style.setProperty(i,r[i])}let nI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function n_(e,t,r,s){for(let r in nD(e,t,void 0,s),t.attrs)e.setAttribute(nI.has(r)?r:t8(r),t.attrs[r])}function nF(e,{layout:t,layoutId:r}){return f.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!su[e]||"opacity"===e)}function nV(e,t,r){var s;let{style:n}=e,i={};for(let o in n)(re(n[o])||t.style&&re(t.style[o])||nF(o,e)||(null===(s=null==r?void 0:r.getValue(o))||void 0===s?void 0:s.liveStyle)!==void 0)&&(i[o]=n[o]);return r&&n&&"string"==typeof n.willChange&&(r.applyWillChange=!1),i}function nH(e,t,r){let s=nV(e,t,r);for(let r in e)(re(e[r])||re(t[r]))&&(s[-1!==p.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return s}var nU=r(53576);let nj=e=>(t,r)=>{let s=(0,ss.useContext)(nw),i=(0,ss.useContext)(sn.O),o=()=>(function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:r,onMount:s},i,o,a,l){let h={latestValues:function(e,t,r,s,i){var o;let a={},l=s&&(null===(o=e.style)||void 0===o?void 0:o.willChange)===void 0,h=i(e,{});for(let e in h)a[e]=sU(h[e]);let{initial:u,animate:c}=e,d=nC(e),p=nM(e);t&&p&&!d&&!1!==e.inherit&&(void 0===u&&(u=t.initial),void 0===c&&(c=t.animate));let f=!!r&&!1===r.initial,m=(f=f||!1===u)?c:u;return m&&"boolean"!=typeof m&&!n(m)&&nK(e,m,(e,t)=>{for(let t in e){let r=e[t];if(Array.isArray(r)){let e=f?r.length-1:0;r=r[e]}null!==r&&(a[t]=r)}for(let e in t)a[e]=t[e]}),l&&c&&!1!==u&&!n(c)&&nK(e,c,e=>{for(let t in e)if(rt(t)){a.willChange="transform";return}}),a}(i,o,a,!l&&e,t),renderState:r()};return s&&(h.mount=e=>s(i,e,h)),h})(e,t,s,i,r);return r?o():(0,nU.h)(o)};function nK(e,t,r){let s=Array.isArray(t)?t:[t];for(let t=0;t({style:{},transform:{},transformOrigin:{},vars:{}}),nz=()=>({...nG(),attrs:{}}),nY=(e,t)=>t&&"number"==typeof e?t.transform(e):e,nW={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nq=p.length;function nX(e,t,r){let{style:s,vars:n,transformOrigin:i}=e,o=!1,a=!1;for(let e in t){let r=t[e];if(f.has(e)){o=!0;continue}if(J(e)){n[e]=r;continue}{let t=nY(r,e1[e]);e.startsWith("origin")?(a=!0,i[e]=t):s[e]=t}}if(!t.transform&&(o||r?s.transform=function(e,t,r){let s="",n=!0;for(let i=0;i"string"==typeof e&&"svg"===e.toLowerCase(),n2={useVisualState:nj({scrapeMotionValuesFromProps:nH,createRenderState:nz,onMount:(e,t,{renderState:r,latestValues:s})=>{R.read(()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}}),R.render(()=>{n0(r,s,n1(t.tagName),e.transformTemplate),n_(t,r)})}})},n3={useVisualState:nj({applyWillChange:!0,scrapeMotionValuesFromProps:nV,createRenderState:nG})};function n5(e,t,r){for(let s in t)re(t[s])||nF(s,r)||(e[s]=t[s])}let n4=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function n6(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||n4.has(e)}let n9=e=>!n6(e);try{(C=require("@emotion/is-prop-valid").default)&&(n9=e=>e.startsWith("on")?!n6(e):C(e))}catch(e){}let n8={current:null},n7={current:!1},ie=new WeakMap,it=[...eE,eV,eq],ir=e=>it.find(eT(e)),is=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ii{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:n,visualState:i},o={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e7.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),n7.current||function(){if(n7.current=!0,n$.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>n8.current=e.matches;e.addListener(t),t()}else n8.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||n8.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in ie.delete(this.current),this.projection&&this.projection.unmount(),B(this.notifyUpdate),B(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let r;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let s=f.has(e),n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&R.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in nP){let t=nP[e];if(!t)continue;let{isEnabled:r,Feature:s}=t;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rG()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=t9(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){var r;let s=void 0===this.latestValues[e]&&this.current?null!==(r=this.getBaseTargetFromProps(this.props,e))&&void 0!==r?r:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=s&&("string"==typeof s&&(X(s)||W(s))?s=parseFloat(s):!ir(s)&&eq.test(t)&&(s=e5(e,t)),this.setBaseTarget(e,re(s)?s.get():s)),re(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let r;let{initial:s}=this.props;if("string"==typeof s||"object"==typeof s){let n=h(this.props,s,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);n&&(r=n[e])}if(s&&void 0!==r)return r;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||re(n)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new t3),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class io extends ii{constructor(){super(...arguments),this.KeyframeResolver=e6}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}}class ia extends io{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=nD}readValueFromInstance(e,t){if(f.has(t)){let e=e3(t);return e&&e.default||0}{let r=window.getComputedStyle(e),s=(J(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return r5(e,t)}build(e,t,r){nX(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return nV(e,t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;re(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class il extends io{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rG}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(f.has(t)){let e=e3(t);return e&&e.default||0}return t=nI.has(t)?t:t8(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return nH(e,t,r)}build(e,t,r){n0(e,t,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,r,s){n_(e,t,r,s)}mount(e){this.isSVGTag=n1(e.tagName),super.mount(e)}}let ih=function(e){if("undefined"==typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(r,s)=>"create"===s?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}((M={animation:{Feature:rd},exit:{Feature:rf},inView:{Feature:nE},tap:{Feature:ng},focus:{Feature:np},hover:{Feature:nd},pan:{Feature:st},drag:{Feature:r7,ProjectionNode:nu,MeasureLayout:sf},layout:{ProjectionNode:nu,MeasureLayout:sf}},O=(e,t)=>nN(e)?new il(t):new ia(t,{allowProjection:e!==ss.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function(e){let{preloadedFeatures:t,createVisualElement:r,useRender:s,useVisualState:n,Component:i}=e;t&&function(e){for(let t in e)nP[t]={...nP[t],...e[t]}}(t);let o=(0,ss.forwardRef)(function(e,t){var o;let l;let h={...(0,ss.useContext)(nA._),...e,layoutId:function(e){let{layoutId:t}=e,r=(0,ss.useContext)(si.p).id;return r&&void 0!==t?r+"-"+t:t}(e)},{isStatic:u}=h,c=function(e){let{initial:t,animate:r}=function(e,t){if(nC(e)){let{initial:t,animate:r}=e;return{initial:!1===t||a(t)?t:void 0,animate:a(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,ss.useContext)(nw));return(0,ss.useMemo)(()=>({initial:t,animate:r}),[nO(t),nO(r)])}(e),d=n(e,u);if(!u&&n$.j){(0,ss.useContext)(nk).strict;let e=function(e){let{drag:t,layout:r}=nP;if(!t&&!r)return{};let s={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(h);l=e.MeasureLayout,c.visualElement=function(e,t,r,s,n){var i,o;let{visualElement:a}=(0,ss.useContext)(nw),l=(0,ss.useContext)(nk),h=(0,ss.useContext)(sn.O),u=(0,ss.useContext)(nA._).reducedMotion,c=(0,ss.useRef)();s=s||l.renderer,!c.current&&s&&(c.current=s(e,{visualState:t,parent:a,props:r,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:u}));let d=c.current,p=(0,ss.useContext)(so);d&&!d.projection&&n&&("html"===d.type||"svg"===d.type)&&function(e,t,r,s){let{layoutId:n,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:n,layout:i,alwaysMeasureLayout:!!o||a&&rP(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:h})}(c.current,r,n,p),(0,ss.useInsertionEffect)(()=>{d&&d.update(r,h)});let f=r[t7],m=(0,ss.useRef)(!!f&&!(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,f))&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,f)));return(0,nS.L)(()=>{d&&(window.MotionIsMounted=!0,d.updateFeatures(),sc.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),(0,ss.useEffect)(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,f)}),m.current=!1))}),d}(i,d,h,r,e.ProjectionNode)}return(0,sr.jsxs)(nw.Provider,{value:c,children:[l&&c.visualElement?(0,sr.jsx)(l,{visualElement:c.visualElement,...h}):null,s(i,e,(o=c.visualElement,(0,ss.useCallback)(e=>{e&&d.mount&&d.mount(e),o&&(e?o.mount(e):o.unmount()),t&&("function"==typeof t?t(e):rP(t)&&(t.current=e))},[o])),d,u,c.visualElement)]})});return o[nR]=i,o}({...nN(e)?n2:n3,preloadedFeatures:M,useRender:function(e=!1){return(t,r,s,{latestValues:n},i)=>{let o=(nN(t)?function(e,t,r,s){let n=(0,ss.useMemo)(()=>{let r=nz();return n0(r,t,n1(s),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};n5(t,e.style,e),n.style={...t,...n.style}}return n}:function(e,t){let r={},s=function(e,t){let r=e.style||{},s={};return n5(s,r,e),Object.assign(s,function({transformTemplate:e},t){return(0,ss.useMemo)(()=>{let r=nG();return nX(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),s}(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=s,r})(r,n,i,t),a=function(e,t,r){let s={};for(let n in e)("values"!==n||"object"!=typeof e.values)&&(n9(n)||!0===r&&n6(n)||!t&&!n6(n)||e.draggable&&n.startsWith("onDrag"))&&(s[n]=e[n]);return s}(r,"string"==typeof t,e),l=t!==ss.Fragment?{...a,...o,ref:s}:{},{children:h}=r,u=(0,ss.useMemo)(()=>re(h)?h.get():h,[h]);return(0,ss.createElement)(t,{...l,children:u})}}(t),createVisualElement:O,Component:e})}))},13223:function(e,t,r){"use strict";r.d(t,{K:function(){return n},k:function(){return i}});var s=r(44439);let n=s.Z,i=s.Z},44563:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});let s="undefined"!=typeof window},44439:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=e=>e},53576:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var s=r(2265);function n(e){let t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}},11534:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});var s=r(2265);let n=r(44563).j?s.useLayoutEffect:s.useEffect},25922:function(e,t,r){"use strict";r.d(t,{F:function(){return o}});var s=r(2265),n=s.createContext(void 0),i={setTheme:e=>{},themes:[]},o=()=>{var e;return null!=(e=s.useContext(n))?e:i}}}]);